From a3342213b5638e8e90f02f570762314de74991e2 Mon Sep 17 00:00:00 2001 From: Steve Dudenhoeffer Date: Fri, 22 Jun 2007 18:25:16 +0000 Subject: [PATCH] Added amb427: Additional weapons to dod_{get,set}_user_ammo --- dlls/dod/dodfun/CMisc.h | 10 ++++++++++ dlls/dod/dodfun/NPD.cpp | 8 ++++++++ 2 files changed, 18 insertions(+) diff --git a/dlls/dod/dodfun/CMisc.h b/dlls/dod/dodfun/CMisc.h index 739d4593..e1840b8e 100755 --- a/dlls/dod/dodfun/CMisc.h +++ b/dlls/dod/dodfun/CMisc.h @@ -223,6 +223,16 @@ enum { DODW_BAZOOKA, DODW_PANZERSCHRECK, DODW_PIAT, + DODW_SCOPED_FG42, + DODW_FOLDING_CARBINE, + DODW_KAR_BAYONET, + DODW_SCOPED_ENFIELD, + DODW_MILLS_BOMB, + DODW_BRITKNIFE, + DODW_GARAND_BUTT, + DODW_ENFIELD_BAYONET, + DODW_MORTAR, + DODW_K43_BUTT, }; diff --git a/dlls/dod/dodfun/NPD.cpp b/dlls/dod/dodfun/NPD.cpp index 7bf92ddd..3a54468c 100755 --- a/dlls/dod/dodfun/NPD.cpp +++ b/dlls/dod/dodfun/NPD.cpp @@ -273,6 +273,7 @@ static cell AMX_NATIVE_CALL set_user_ammo(AMX *amx, cell *params){ case DODW_KAR: case DODW_SCOPED_KAR: case DODW_ENFIELD: + case DODW_SCOPED_ENFIELD: *( (int*)pPlayer->pEdict->pvPrivateData + 54+LINUXOFFSET ) = params[3]; *( (int*)pPlayer->pEdict->pvPrivateData + 283+LINUXOFFSET ) = params[3]; *( (int*)pPlayer->pEdict->pvPrivateData + 315+LINUXOFFSET ) = params[3]; @@ -283,6 +284,7 @@ static cell AMX_NATIVE_CALL set_user_ammo(AMX *amx, cell *params){ case DODW_BAR: case DODW_FG42: case DODW_BREN: + case DODW_SCOPED_FG42: *( (int*)pPlayer->pEdict->pvPrivateData + 57+LINUXOFFSET ) = params[3]; *( (int*)pPlayer->pEdict->pvPrivateData + 286+LINUXOFFSET ) = params[3]; *( (int*)pPlayer->pEdict->pvPrivateData + 318+LINUXOFFSET ) = params[3]; @@ -302,6 +304,7 @@ static cell AMX_NATIVE_CALL set_user_ammo(AMX *amx, cell *params){ case DODW_K43: case DODW_M1_CARBINE: case DODW_MG34: + case DODW_FOLDING_CARBINE: *( (int*)pPlayer->pEdict->pvPrivateData + 58+LINUXOFFSET ) = params[3]; *( (int*)pPlayer->pEdict->pvPrivateData + 282+LINUXOFFSET ) = params[3]; *( (int*)pPlayer->pEdict->pvPrivateData + 314+LINUXOFFSET ) = params[3]; @@ -316,6 +319,7 @@ static cell AMX_NATIVE_CALL set_user_ammo(AMX *amx, cell *params){ //59,289,321 case DODW_HANDGRENADE: + case DODW_MILLS_BOMB: *( (int*)pPlayer->pEdict->pvPrivateData + 59+LINUXOFFSET ) = params[3]; *( (int*)pPlayer->pEdict->pvPrivateData + 289+LINUXOFFSET ) = params[3]; *( (int*)pPlayer->pEdict->pvPrivateData + 321+LINUXOFFSET ) = params[3]; @@ -382,6 +386,7 @@ static cell AMX_NATIVE_CALL get_user_ammo(AMX *amx, cell *params){ case DODW_KAR: case DODW_SCOPED_KAR: case DODW_ENFIELD: + case DODW_SCOPED_ENFIELD: return *( (int*)pPlayer->pEdict->pvPrivateData + 54+LINUXOFFSET ); break; @@ -403,6 +408,7 @@ static cell AMX_NATIVE_CALL get_user_ammo(AMX *amx, cell *params){ case DODW_BAR: case DODW_FG42: case DODW_BREN: + case DODW_SCOPED_FG42: return *( (int*)pPlayer->pEdict->pvPrivateData + 57+LINUXOFFSET ); break; @@ -410,11 +416,13 @@ static cell AMX_NATIVE_CALL get_user_ammo(AMX *amx, cell *params){ case DODW_K43: case DODW_M1_CARBINE: case DODW_MG34: + case DODW_FOLDING_CARBINE: return *( (int*)pPlayer->pEdict->pvPrivateData + 58+LINUXOFFSET ); break; //59,289,321 case DODW_HANDGRENADE: + case DODW_MILLS_BOMB: return *( (int*)pPlayer->pEdict->pvPrivateData + 59+LINUXOFFSET ); break;