diff --git a/dlls/dod2/dodx/Utils.cpp b/dlls/dod2/dodx/Utils.cpp index aa8b0157..5879c869 100755 --- a/dlls/dod2/dodx/Utils.cpp +++ b/dlls/dod2/dodx/Utils.cpp @@ -35,48 +35,48 @@ /* Weapon names aren't send in WeaponList message in DoD */ weapon_t weaponData[] = { - { false, false, "mortar", "mortar", 0, DODWT_OTHER }, - { true, true, "amerknife", "knife", 0, DODWT_MELEE }, // aknife->bknife - { false, true, "gerknife", "knife", 0, DODWT_MELEE }, - { false, false, "colt", "Colt", 4, DODWT_SECONDARY }, - { false, false, "luger", "Luger", 4, DODWT_SECONDARY }, - { true, false, "garand", "Garand", 3, DODWT_PRIMARY }, // Garand->Garand butt - { false, false, "scopedkar", "scoped K98", 3, DODWT_PRIMARY }, - { false, false, "thompson", "Thompson", 1, DODWT_PRIMARY }, - { false, false, "mp44", "STG44", 6, DODWT_PRIMARY }, - { false, false, "spring", "Springfield", 5, DODWT_PRIMARY }, - { true, false, "kar", "K98", 3, DODWT_PRIMARY }, // KAR->KAR bayonet - { false, false, "bar", "BAR", 6, DODWT_PRIMARY }, - { false, false, "mp40", "MP40", 1, DODWT_PRIMARY }, - { false, false, "grenade", "handgrenade", 9, DODWT_GRENADE }, - { false, false, "grenade2", "stickgrenade", 11, DODWT_GRENADE }, - { false, false, "stickgrenade_ex", "stickgrenade_ex", 11, DODWT_GRENADE }, - { false, false, "handgrenade_ex", "handgrenade_ex", 9, DODWT_GRENADE }, - { false, false, "mg42", "MG42", 7, DODWT_PRIMARY }, - { false, false, "30cal", ".30 cal", 8, DODWT_PRIMARY }, - { false, true, "spade", "spade", 0, DODWT_MELEE }, - { true, false, "m1carbine", "M1 Carbine", 2, DODWT_PRIMARY }, // M1 Carbine->Folding Carbine - { false, false, "mg34", "MG34", 2, DODWT_PRIMARY }, - { false, false, "greasegun", "Greasegun", 1, DODWT_PRIMARY }, - { true, false, "fg42", "FG42", 6, DODWT_PRIMARY }, // FG42 -> scoped FG42 - { true, false, "k43", "K43", 2, DODWT_PRIMARY }, - { true, false, "enfield", "Enfield", 3, DODWT_PRIMARY }, // Enfield->Scoped Enfield->Enfield bayonet - { false, false, "sten", "Sten", 1, DODWT_PRIMARY }, - { false, false, "bren", "Bren", 6, DODWT_PRIMARY }, - { false, false, "webley", "Webley", 4, DODWT_PRIMARY }, - { false, false, "bazooka", "Bazooka", 13, DODWT_PRIMARY }, - { false, false, "pschreck", "Panzerschrek", 13, DODWT_PRIMARY }, - { false, false, "piat", "Piat", 13, DODWT_PRIMARY }, - { false, false, "scoped_fg42", "scoped FG42", 6, DODWT_PRIMARY }, - { false, false, "fcarbine", "Folding Carbine", 0, DODWT_PRIMARY }, - { false, true, "bayonet", "K98 bayonet", 0, DODWT_MELEE }, // KAR bayonet - { false, false, "scoped_enfield", "scoped Enfield", 3, DODWT_PRIMARY }, - { false, false, "mills_bomb", "mills bomb", 9, DODWT_GRENADE }, - { false, true, "brit_knife", "knife", 0, DODWT_MELEE }, - { false, true, "garandbutt", "Garand butt", 0, DODWT_MELEE }, // Garand butt - { false, true, "enf_bayonet", "Enfield bayonet", 0, DODWT_MELEE }, - { false, false, "mortar", "mortar", 0, DODWT_OTHER }, // mortar new id - { false, true, "k43butt", "K43 butt", 0, DODWT_MELEE }, + { false, false, {"mortar"}, {"mortar"}, 0, DODWT_OTHER }, + { true, true, {"amerknife"}, {"knife"}, 0, DODWT_MELEE }, // aknife->bknife + { false, true, {"gerknife"}, {"knife"}, 0, DODWT_MELEE }, + { false, false, {"colt"}, {"Colt"}, 4, DODWT_SECONDARY }, + { false, false, {"luger"}, {"Luger"}, 4, DODWT_SECONDARY }, + { true, false, {"garand"}, {"Garand"}, 3, DODWT_PRIMARY }, // Garand->Garand butt + { false, false, {"scopedkar"}, {"scoped K98"}, 3, DODWT_PRIMARY }, + { false, false, {"thompson"}, {"Thompson"}, 1, DODWT_PRIMARY }, + { false, false, {"mp44"}, {"STG44"}, 6, DODWT_PRIMARY }, + { false, false, {"spring"}, {"Springfield"}, 5, DODWT_PRIMARY }, + { true, false, {"kar"}, {"K98"}, 3, DODWT_PRIMARY }, // KAR->KAR bayonet + { false, false, {"bar"}, {"BAR"}, 6, DODWT_PRIMARY }, + { false, false, {"mp40"}, {"MP40"}, 1, DODWT_PRIMARY }, + { false, false, {"grenade"}, {"handgrenade"}, 9, DODWT_GRENADE }, + { false, false, {"grenade2"}, {"stickgrenade"}, 11, DODWT_GRENADE }, + { false, false, {"stickgrenade_ex"},{"stickgrenade_ex"}, 11, DODWT_GRENADE }, + { false, false, {"handgrenade_ex"}, {"handgrenade_ex"}, 9, DODWT_GRENADE }, + { false, false, {"mg42"}, {"MG42"}, 7, DODWT_PRIMARY }, + { false, false, {"30cal"}, {".30 cal"}, 8, DODWT_PRIMARY }, + { false, true, {"spade"}, {"spade"}, 0, DODWT_MELEE }, + { true, false, {"m1carbine"}, {"M1 Carbine"}, 2, DODWT_PRIMARY }, // M1 Carbine->Folding Carbine + { false, false, {"mg34"}, {"MG34"}, 2, DODWT_PRIMARY }, + { false, false, {"greasegun"}, {"Greasegun"}, 1, DODWT_PRIMARY }, + { true, false, {"fg42"}, {"FG42"}, 6, DODWT_PRIMARY }, // FG42 -> scoped FG42 + { true, false, {"k43"}, {"K43"}, 2, DODWT_PRIMARY }, + { true, false, {"enfield"}, {"Enfield"}, 3, DODWT_PRIMARY }, // Enfield->Scoped Enfield->Enfield bayonet + { false, false, {"sten"}, {"Sten"}, 1, DODWT_PRIMARY }, + { false, false, {"bren"}, {"Bren"}, 6, DODWT_PRIMARY }, + { false, false, {"webley"}, {"Webley"}, 4, DODWT_PRIMARY }, + { false, false, {"bazooka"}, {"Bazooka"}, 13, DODWT_PRIMARY }, + { false, false, {"pschreck"}, {"Panzerschrek"}, 13, DODWT_PRIMARY }, + { false, false, {"piat"}, {"Piat"}, 13, DODWT_PRIMARY }, + { false, false, {"scoped_fg42"}, {"scoped FG42"}, 6, DODWT_PRIMARY }, + { false, false, {"fcarbine"}, {"Folding Carbine"}, 0, DODWT_PRIMARY }, + { false, true, {"bayonet"}, {"K98 bayonet"}, 0, DODWT_MELEE }, // KAR bayonet + { false, false, {"scoped_enfield"}, {"scoped Enfield"}, 3, DODWT_PRIMARY }, + { false, false, {"mills_bomb"}, {"mills bomb"}, 9, DODWT_GRENADE }, + { false, true, {"brit_knife"}, {"knife"}, 0, DODWT_MELEE }, + { false, true, {"garandbutt"}, {"Garand butt"}, 0, DODWT_MELEE }, // Garand butt + { false, true, {"enf_bayonet"}, {"Enfield bayonet"}, 0, DODWT_MELEE }, + { false, false, {"mortar"}, {"mortar"}, 0, DODWT_OTHER }, // mortar new id + { false, true, {"k43butt"}, {"K43 butt"}, 0, DODWT_MELEE }, }; /* Function will select correct id */ diff --git a/dlls/dod2/dodx/dodx.h b/dlls/dod2/dodx/dodx.h index be489e57..7916b6b8 100755 --- a/dlls/dod2/dodx/dodx.h +++ b/dlls/dod2/dodx/dodx.h @@ -73,7 +73,6 @@ struct weapon_t bool melee; char logname[16]; char name[32]; - char hashname[32]; int ammoSlot; int type; }; diff --git a/dlls/dod2/dodx/moduleconfig.cpp b/dlls/dod2/dodx/moduleconfig.cpp index 6b90b8cb..eb2eab31 100755 --- a/dlls/dod2/dodx/moduleconfig.cpp +++ b/dlls/dod2/dodx/moduleconfig.cpp @@ -377,7 +377,10 @@ void TraceLine_Post(const float *v1, const float *v2, int fNoMonsters, edict_t * else if(traceData[i].iAction&ACT_ROCKET_SHOT) pPlayer->saveShot(traceData[i].iId); - cell position[3] = {v2[0], v2[1], v2[2]}; + cell position[3]; + position[0] = amx_ftoc(v2[0]); + position[1] = amx_ftoc(v2[1]); + position[2] = amx_ftoc(v2[2]); cell pos = MF_PrepareCellArray(position, 3); if(traceData[i].iAction&ACT_NADE_PUT) @@ -511,4 +514,4 @@ void OnPluginsLoaded() iFRocketExplode = MF_RegisterForward("dod_rocket_explosion",ET_IGNORE,FP_CELL/*id*/,FP_ARRAY/*pos[3]*/,FP_CELL/*wpnid*/,FP_DONE); iFObjectTouched = MF_RegisterForward("dod_client_objectpickup",ET_IGNORE,FP_CELL/*id*/,FP_CELL/*object*/,FP_ARRAY/*pos[3]*/,FP_CELL/*value*/,FP_DONE); iFStaminaForward = MF_RegisterForward("dod_client_stamina",ET_IGNORE,FP_CELL/*id*/,FP_CELL/*stamina*/,FP_DONE); -} \ No newline at end of file +} diff --git a/dlls/dod2/dodx/svn_version.h b/dlls/dod2/dodx/svn_version.h index 143f5e53..2e9f32cc 100644 --- a/dlls/dod2/dodx/svn_version.h +++ b/dlls/dod2/dodx/svn_version.h @@ -4,6 +4,6 @@ /** This file is auto-generated by build scripts. Do not edit it unless you know what you're doing. */ /** Do not commit the generated .h file, as it will only mess up SVN revision numbers. */ -#define SVN_VERSION "1.8.0.3392" +#define SVN_VERSION "1.8.0.3405" #endif //_INCLUDE_SVN_VERSION_H_ diff --git a/dlls/dod2/dodx/usermsg.cpp b/dlls/dod2/dodx/usermsg.cpp index 6d265712..263ec07f 100755 --- a/dlls/dod2/dodx/usermsg.cpp +++ b/dlls/dod2/dodx/usermsg.cpp @@ -338,7 +338,10 @@ void Client_Object_End(void* mValue) mPlayer->object.carrying = (mPlayer->object.carrying) ? false : true; mPlayer->object.pEdict->v.origin.CopyToArray(fposition); - cell position[3] = {fposition[0], fposition[1], fposition[2]}; + cell position[3]; + position[0] = amx_ftoc(fposition[0]); + position[1] = amx_ftoc(fposition[1]); + position[2] = amx_ftoc(fposition[2]); cell pos = MF_PrepareCellArray(position, 3); MF_ExecuteForward(iFObjectTouched, mPlayer->index, ENTINDEX(mPlayer->object.pEdict), pos, mPlayer->object.carrying);