From: terencehill Date: Sat, 16 Mar 2024 17:28:33 +0000 (+0100) Subject: Fix (this.shootfromfixedorigin != autocvar_g_shootfromfixedorigin) check not working... X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=a426118517e1f268880c45f2fdbb57e4e56d6478 Fix (this.shootfromfixedorigin != autocvar_g_shootfromfixedorigin) check not working because this.shootfromfixedorigin wasn't strzoned --- diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index 58473889b..c1ee3aceb 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -1204,6 +1204,11 @@ void ClientConnect(entity this) localcmd("\nsv_hook_firstjoin\n"); } } + +.string shootfromfixedorigin; +.entity chatbubbleentity; +void player_powerups_remove_all(entity this); + /* ============= ClientDisconnect @@ -1211,9 +1216,6 @@ ClientDisconnect Called when a client disconnects from the server ============= */ -.entity chatbubbleentity; -void player_powerups_remove_all(entity this); - void ClientDisconnect(entity this) { assert(IS_CLIENT(this), return); @@ -1257,6 +1259,8 @@ void ClientDisconnect(entity this) RemoveGrapplingHooks(this); + strfree(this.shootfromfixedorigin); + // Here, everything has been done that requires this player to be a client. this.flags &= ~FL_CLIENT; @@ -2124,7 +2128,6 @@ void show_entnum(entity this) this.wp_aimed = ent; } -.string shootfromfixedorigin; .bool dualwielding_prev; bool PlayerThink(entity this) { @@ -2226,7 +2229,7 @@ bool PlayerThink(entity this) FixPlayermodel(this); if (this.shootfromfixedorigin != autocvar_g_shootfromfixedorigin) { - this.shootfromfixedorigin = autocvar_g_shootfromfixedorigin; + strcpy(this.shootfromfixedorigin, autocvar_g_shootfromfixedorigin); stuffcmd(this, sprintf("\ncl_shootfromfixedorigin \"%s\"\n", autocvar_g_shootfromfixedorigin)); }