From 1c428eb52a9d22efcba30af6bb9791be20e0d37a Mon Sep 17 00:00:00 2001 From: puzl Date: Sat, 20 May 2006 00:27:27 +0000 Subject: [PATCH] Mantis: 0001131 o Fixed an exploit where commanders could place structures silently. git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@495 67975925-1194-0748-b3d5-c16f83f1a3a1 --- releases/3.2.0/source/mod/AvHServerUtil.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/releases/3.2.0/source/mod/AvHServerUtil.cpp b/releases/3.2.0/source/mod/AvHServerUtil.cpp index 134c87ca..83b2dc93 100644 --- a/releases/3.2.0/source/mod/AvHServerUtil.cpp +++ b/releases/3.2.0/source/mod/AvHServerUtil.cpp @@ -474,7 +474,12 @@ CBaseEntity* AvHSUBuildTechForPlayer(AvHMessageID inBuildID, const Vector& inLoc { //voogru: play effect at player origin in combat, cause the item is in the middle of nowhere. Vector vecOrigin = (theEntity->IsInWorld() && !GetGameRules()->GetIsCombatMode()) ? inLocation : inPlayer->pev->origin; - PLAYBACK_EVENT_FULL(0, inPlayer->edict(), gPhaseInEventID, 0, vecOrigin, (float *)&g_vecZero, 0.0, 0.0, 0, 0, 0, 0 ); + if( GetGameRules()->GetIsCombatMode() ) { + PLAYBACK_EVENT_FULL(0, inPlayer->edict(), gPhaseInEventID, 0, vecOrigin, (float *)&g_vecZero, 0.0, 0.0, 0, 0, 0, 0 ); + } + else { + PLAYBACK_EVENT_FULL(0, 0, gPhaseInEventID, 0, vecOrigin, (float *)&g_vecZero, 0.0, 0.0, 0, 0, 0, 0 ); + } } } }