Fix project tile

This commit is contained in:
btd 2010-11-13 18:41:43 +03:00
parent e3fb77f444
commit 002cf9792f
3 changed files with 7 additions and 3 deletions

View file

@ -1,5 +1,9 @@
#include "gamecontext.h"
#include <engine/shared/config.h>
#include <engine/server/server.h>
#include <game/server/teams.h>
#include <game/server/gamemodes/DDRace.h>
#include <game/version.h>
void CGameContext::ConTuneParam(IConsole::IResult *pResult, void *pUserData, int ClientId)
{

View file

@ -118,7 +118,7 @@ void CProjectile::Tick()
{
if(m_Explosive/*??*/ && (!TargetChr || (TargetChr && !m_Freeze)))
{
GameServer()->CreateExplosion(ColPos, m_Owner, m_Weapon, m_Owner == -1, TargetChr->Team(),
GameServer()->CreateExplosion(ColPos, m_Owner, m_Weapon, m_Owner == -1, (TargetChr ? -1 : TargetChr->Team()),
(m_Owner != -1)? TeamMask : -1);
GameServer()->CreateSound(ColPos, m_SoundImpact,
(m_Owner != -1)? TeamMask : -1);

View file

@ -150,7 +150,7 @@ void CGameContext::CreateExplosion(vec2 P, int Owner, int Weapon, bool NoDamage,
if((g_Config.m_SvHit||NoDamage) || Owner == apEnts[i]->m_pPlayer->GetCID())
{
if(Owner != -1 && apEnts[i]->m_Alive && !apEnts[i]->CanCollide(Owner)) continue;
if(Owner == -1 && apEnts[i]->m_Alive && apEnts[i]->Team() != ActivatedTeam) continue;
if(Owner == -1 && ActivatedTeam != -1 && apEnts[i]->m_Alive && apEnts[i]->Team() != ActivatedTeam) continue;
apEnts[i]->TakeDamage(ForceDir*Dmg*2, (int)Dmg, Owner, Weapon);
if(!g_Config.m_SvHit||NoDamage) break;
}