From 567ab19fe55fd0c98659555bb2df37c62620f3eb Mon Sep 17 00:00:00 2001 From: Lukasz Wlasinksi Date: Tue, 31 May 2005 21:08:56 +0000 Subject: [PATCH] added cap_message to CP_ enum --- dlls/dod2/dodfun/CMisc.h | 3 ++- dlls/dod2/dodfun/NPD.cpp | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/dlls/dod2/dodfun/CMisc.h b/dlls/dod2/dodfun/CMisc.h index fcd77292..739d4593 100755 --- a/dlls/dod2/dodfun/CMisc.h +++ b/dlls/dod2/dodfun/CMisc.h @@ -98,7 +98,7 @@ struct pd_dcp { int points_for_team; float funk_98; // always 1.0 float cap_time; - char win_string[256]; // 100 MAP_PLAYER_CAP , %p player , %n pointname , %t teamname + char cap_message[256]; // 100 MAP_PLAYER_CAP , %p player , %n pointname , %t teamname int iunk_164; int iunk_165; char target_allies[256]; // 166 @@ -322,6 +322,7 @@ enum CP_VALUE { // strings CP_name, + CP_cap_message, CP_reset_capsound, CP_allies_capsound, CP_axis_capsound, diff --git a/dlls/dod2/dodfun/NPD.cpp b/dlls/dod2/dodfun/NPD.cpp index 955e682a..047b9b81 100755 --- a/dlls/dod2/dodfun/NPD.cpp +++ b/dlls/dod2/dodfun/NPD.cpp @@ -513,6 +513,9 @@ static cell AMX_NATIVE_CALL objective_set_data(AMX *amx, cell *params){ // index case CP_name : mObjects.obj[index].pEdict->v.netname = MAKE_STRING(szValue); return 1; + case CP_cap_message : + strcpy(GET_CP_PD(mObjects.obj[index].pEdict).cap_message,szValue); + return 1; case CP_reset_capsound : mObjects.obj[index].pEdict->v.noise = MAKE_STRING(szValue); return 1; @@ -595,6 +598,11 @@ static cell AMX_NATIVE_CALL objective_get_data(AMX *amx, cell *params){ // flagi MF_SetAmxString(amx,params[3],STRING(mObjects.obj[index].pEdict->v.netname),len); } return 1; + case CP_cap_message : + if ( len ){ + MF_SetAmxString(amx,params[3],GET_CP_PD(mObjects.obj[index].pEdict).cap_message,len); + } + return 1; case CP_reset_capsound : if ( len ){ MF_SetAmxString(amx,params[3],STRING(mObjects.obj[index].pEdict->v.noise),len);