Skip to content

Commit

Permalink
Update turret.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
ST-Chara authored Feb 17, 2024
1 parent 349f2e6 commit bc3a159
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/game/server/entities/turret.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,17 @@ CTurret::CTurret(CGameWorld *pGameWorld, vec2 Pos, int Owner, int Type, vec2 Pos
m_Ammo = 1+GameServer()->m_apPlayers[m_Owner]->m_AccData.m_TurretAmmo;

for (unsigned i = 0; i < sizeof(m_inIDs) / sizeof(int); i ++)
m_inIDs[i] = Server()->SnapNewID();
m_inIDs[i] = Server()->SnapNewID();

m_IDC = Server()->SnapNewID();
m_IDS = Server()->SnapNewID();
m_IDG = Server()->SnapNewID();
GameWorld()->InsertEntity(this);
GameWorld()->InsertEntity(this);
}

void CTurret::~CTurret()
{
Reset();
}

void CTurret::Reset()
Expand Down

0 comments on commit bc3a159

Please sign in to comment.