# HG changeset patch # User Adam Kaminski # Date 1612711401 18000 # Sun Feb 07 10:23:21 2021 -0500 # Node ID 74a45b2ff28feb9f926209d3225dc6f4e64f82a3 # Parent a1a7c521ab0c8b24bf6aa64bedd95dd76966d371 Fixed Team_Score and Team_GivePoints not working properly on all gamemodes that support teams and give points. diff -r a1a7c521ab0c -r 74a45b2ff28f src/p_lnspec.cpp --- a/src/p_lnspec.cpp Sun Feb 07 10:19:48 2021 -0500 +++ b/src/p_lnspec.cpp Sun Feb 07 10:23:21 2021 -0500 @@ -68,6 +68,7 @@ #include "cl_demo.h" #include "p_acs.h" #include "g_game.h" +#include "gamemode.h" #define FUNC(a) static int a (line_t *ln, AActor *it, bool backSide, \ int arg0, int arg1, int arg2, int arg3, int arg4) @@ -2107,8 +2108,8 @@ if ( NETWORK_InClientMode() ) return ( false ); - // Nothing to do if we're not in teamgame mode. - if ( teamgame == false ) + // [AK] Nothing to do if the current gamemode doesn't support teams and give points. + if (( GAMEMODE_GetCurrentFlags() & ( GMF_PLAYERSONTEAMS | GMF_PLAYERSEARNPOINTS )) != ( GMF_PLAYERSONTEAMS | GMF_PLAYERSEARNPOINTS )) return ( false ); // Make sure a valid player is doing the scoring. @@ -2128,8 +2129,8 @@ if ( NETWORK_InClientMode() ) return ( false ); - // Nothing to do if we're not in teamgame mode. - if ( teamgame == false ) + // [AK] Nothing to do if the current gamemode doesn't support teams and give points. + if (( GAMEMODE_GetCurrentFlags() & ( GMF_PLAYERSONTEAMS | GMF_PLAYERSEARNPOINTS )) != ( GMF_PLAYERSONTEAMS | GMF_PLAYERSEARNPOINTS )) return ( false ); // Make sure this is a valid team.