mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2025-01-23 20:28:03 +03:00
Fix cs_user_spawn to properly respawn players (bug 3752, r=dvander)
Former-commit-id: 3bae515741f59ca9679cbacc1f81dce6734fa67b
This commit is contained in:
parent
4e81779adb
commit
f606adfa69
@ -1327,8 +1327,14 @@ static cell AMX_NATIVE_CALL cs_user_spawn(AMX *amx, cell *params)
|
|||||||
edict_t *pPlayer = MF_GetPlayerEdict(params[1]);
|
edict_t *pPlayer = MF_GetPlayerEdict(params[1]);
|
||||||
|
|
||||||
pPlayer->v.deadflag = DEAD_RESPAWNABLE;
|
pPlayer->v.deadflag = DEAD_RESPAWNABLE;
|
||||||
MDLL_Spawn(pPlayer);
|
MDLL_Think(pPlayer);
|
||||||
pPlayer->v.iuser1 = 0;
|
|
||||||
|
const char *auth = GETPLAYERAUTHID(pPlayer);
|
||||||
|
if (((pPlayer->v.flags & FL_FAKECLIENT) == FL_FAKECLIENT || (auth && (strcmp(auth, "BOT") == 0))) && pPlayer->v.deadflag == DEAD_RESPAWNABLE) {
|
||||||
|
MDLL_Spawn(pPlayer);
|
||||||
|
}
|
||||||
|
|
||||||
|
// pPlayer->v.iuser1 = 0;
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user