diff options
| author | Choupom <andycootlapin@hotmail.fr> | 2011-04-03 10:11:23 +0200 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2011-04-03 22:57:03 +0200 |
| commit | 733f0b33905bcd8d2097a302c145707cf29ec0d7 (patch) | |
| tree | f1c94e3528073eb6b1c0a9bebe32111751588284 /src/game/client/gameclient.cpp | |
| parent | 7a772f4e2053806286df42b2802f616cd4961441 (diff) | |
| download | zcatch-733f0b33905bcd8d2097a302c145707cf29ec0d7.tar.gz zcatch-733f0b33905bcd8d2097a302c145707cf29ec0d7.zip | |
reimplemented extra projectiles
Diffstat (limited to 'src/game/client/gameclient.cpp')
| -rw-r--r-- | src/game/client/gameclient.cpp | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/src/game/client/gameclient.cpp b/src/game/client/gameclient.cpp index e5b5e298..28fdb31e 100644 --- a/src/game/client/gameclient.cpp +++ b/src/game/client/gameclient.cpp @@ -136,6 +136,7 @@ void CGameClient::OnConsoleInit() m_pMapimages = &::gs_MapImages; m_pVoting = &::gs_Voting; m_pScoreboard = &::gs_Scoreboard; + m_pItems = &::gs_Items; // make a list of all the systems, make sure to add them in the corrent render order m_All.Add(m_pSkins); @@ -152,7 +153,7 @@ void CGameClient::OnConsoleInit() m_All.Add(&gs_MapLayersBackGround); // first to render m_All.Add(&m_pParticles->m_RenderTrail); - m_All.Add(&gs_Items); + m_All.Add(m_pItems); m_All.Add(&gs_Players); m_All.Add(&gs_MapLayersForeGround); m_All.Add(&m_pParticles->m_RenderExplosions); @@ -477,30 +478,24 @@ void CGameClient::OnRelease() void CGameClient::OnMessage(int MsgId, CUnpacker *pUnpacker) { - // special messages if(MsgId == NETMSGTYPE_SV_EXTRAPROJECTILE) { - /* - int num = msg_unpack_int(); + int Num = pUnpacker->GetInt(); - for(int k = 0; k < num; k++) + for(int k = 0; k < Num; k++) { - NETOBJ_PROJECTILE proj; - for(unsigned i = 0; i < sizeof(NETOBJ_PROJECTILE)/sizeof(int); i++) - ((int *)&proj)[i] = msg_unpack_int(); + CNetObj_Projectile Proj; + for(unsigned i = 0; i < sizeof(CNetObj_Projectile)/sizeof(int); i++) + ((int *)&Proj)[i] = pUnpacker->GetInt(); - if(msg_unpack_error()) + if(pUnpacker->Error()) return; - - if(extraproj_num != MAX_EXTRA_PROJECTILES) - { - extraproj_projectiles[extraproj_num] = proj; - extraproj_num++; - } + + g_GameClient.m_pItems->AddExtraProjectile(&Proj); } - return;*/ + return; } else if(MsgId == NETMSGTYPE_SV_TUNEPARAMS) { |