mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Fix plasmas
This commit is contained in:
parent
c87a68b2ba
commit
b07cc717d4
|
@ -12,7 +12,7 @@ const int RANGE=700;
|
||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
// CGun
|
// CGun
|
||||||
//////////////////////////////////////////////////
|
//////////////////////////////////////////////////
|
||||||
CGun::CGun(CGameWorld *pGameWorld, vec2 Pos, int Freeze, bool Explosive)
|
CGun::CGun(CGameWorld *pGameWorld, vec2 Pos, bool Freeze, bool Explosive)
|
||||||
: CEntity(pGameWorld, NETOBJTYPE_LASER)
|
: CEntity(pGameWorld, NETOBJTYPE_LASER)
|
||||||
{
|
{
|
||||||
m_Delay = Server()->TickSpeed()*0.3f;
|
m_Delay = Server()->TickSpeed()*0.3f;
|
||||||
|
|
|
@ -13,14 +13,14 @@ class CGun : public CEntity
|
||||||
int m_EvalTick;
|
int m_EvalTick;
|
||||||
|
|
||||||
vec2 m_Core;
|
vec2 m_Core;
|
||||||
int m_Freeze;
|
bool m_Freeze;
|
||||||
bool m_Explosive;
|
bool m_Explosive;
|
||||||
|
|
||||||
void Fire();
|
void Fire();
|
||||||
int m_Delay;
|
int m_Delay;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CGun(CGameWorld *pGameWorld, vec2 Pos, int Freeze, bool Explosive);
|
CGun(CGameWorld *pGameWorld, vec2 Pos, bool Freeze, bool Explosive);
|
||||||
|
|
||||||
virtual void Reset();
|
virtual void Reset();
|
||||||
virtual void Tick();
|
virtual void Tick();
|
||||||
|
|
|
@ -273,19 +273,19 @@ bool IGameController::OnEntity(int Index, vec2 Pos, bool Front)
|
||||||
}
|
}
|
||||||
else if(Index==ENTITY_PLASMAE)
|
else if(Index==ENTITY_PLASMAE)
|
||||||
{
|
{
|
||||||
new CGun(&GameServer()->m_World, Pos, 0, true);
|
new CGun(&GameServer()->m_World, Pos, false, true);
|
||||||
}
|
}
|
||||||
else if(Index==ENTITY_PLASMAF)
|
else if(Index==ENTITY_PLASMAF)
|
||||||
{
|
{
|
||||||
new CGun(&GameServer()->m_World, Pos, 1, false);
|
new CGun(&GameServer()->m_World, Pos, true, false);
|
||||||
}
|
}
|
||||||
else if(Index==ENTITY_PLASMA)
|
else if(Index==ENTITY_PLASMA)
|
||||||
{
|
{
|
||||||
new CGun(&GameServer()->m_World, Pos, 1, true);
|
new CGun(&GameServer()->m_World, Pos, true, true);
|
||||||
}
|
}
|
||||||
else if(Index==ENTITY_PLASMAU)
|
else if(Index==ENTITY_PLASMAU)
|
||||||
{
|
{
|
||||||
new CGun(&GameServer()->m_World, Pos, -1, false);
|
new CGun(&GameServer()->m_World, Pos, false, false);
|
||||||
}
|
}
|
||||||
if(Type != -1)
|
if(Type != -1)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue