From 307e71455a8babfb0a3c2e660e4bc4891e87a645 Mon Sep 17 00:00:00 2001 From: diamond-optic <42895423+diamond-optic@users.noreply.github.com> Date: Thu, 28 May 2020 18:54:36 -0400 Subject: [PATCH] Fix broken DoD Fun module natives (#851) * Update hardcorded offsets * Fixed using incorrect parameter for setting string --- modules/dod/dodfun/CMisc.h | 12 ++++++------ modules/dod/dodfun/NPD.cpp | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/dod/dodfun/CMisc.h b/modules/dod/dodfun/CMisc.h index 2861ee78..a6848bb6 100644 --- a/modules/dod/dodfun/CMisc.h +++ b/modules/dod/dodfun/CMisc.h @@ -24,14 +24,14 @@ #define DODFUN_VERSION "1.0.2" // DoD Player -#define STEAM_PDOFFSET_WDEPLOY 229 + LINUXOFFSET // weapon deploy +#define STEAM_PDOFFSET_WDEPLOY 230 + LINUXOFFSET // weapon deploy -#define STEAM_PDOFFSET_TEAMNAME 1396 + (LINUXOFFSET * sizeof(char)) // team name 349 char[16] -#define STEAM_PDOFFSET_CLASS 366 + LINUXOFFSET // player class -#define STEAM_PDOFFSET_RCLASS 367 + LINUXOFFSET // random class +#define STEAM_PDOFFSET_TEAMNAME 1400 + (LINUXOFFSET * sizeof(char)) // team name 349 char[16] +#define STEAM_PDOFFSET_CLASS 367 + LINUXOFFSET // player class +#define STEAM_PDOFFSET_RCLASS 368 + LINUXOFFSET // random class -#define STEAM_PDOFFSET_SCORE 475 + LINUXOFFSET // score -#define STEAM_PDOFFSET_DEATHS 476 + LINUXOFFSET // deaths +#define STEAM_PDOFFSET_SCORE 476 + LINUXOFFSET // score +#define STEAM_PDOFFSET_DEATHS 477 + LINUXOFFSET // deaths // DoD Control Point struct pd_dcp { diff --git a/modules/dod/dodfun/NPD.cpp b/modules/dod/dodfun/NPD.cpp index 1d671756..98cf2fd3 100644 --- a/modules/dod/dodfun/NPD.cpp +++ b/modules/dod/dodfun/NPD.cpp @@ -206,7 +206,7 @@ static cell AMX_NATIVE_CALL set_user_teamname(AMX *amx, cell *params){ if ( pPlayer->ingame ){ int iLen; - char *szTeamName = MF_GetAmxString(amx, params[1], 0, &iLen); + char *szTeamName = MF_GetAmxString(amx, params[2], 0, &iLen); pPlayer->setTeamName(szTeamName);