diff options
| author | oy <Tom_Adams@web.de> | 2010-08-18 00:06:00 +0200 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2010-08-18 00:06:00 +0200 |
| commit | cabecb7fa937b5e4efa859ea62722468f91a5089 (patch) | |
| tree | d9da92814dd049dfef7bdcfa9069955504341b8c /src/game/server/entities | |
| parent | 16f201794de61e237b4a7644d28f043dc1b987bb (diff) | |
| download | zcatch-cabecb7fa937b5e4efa859ea62722468f91a5089.tar.gz zcatch-cabecb7fa937b5e4efa859ea62722468f91a5089.zip | |
added output level for console print function, categorised the debug messages and merged them into the new functionality. Closes #8
Diffstat (limited to 'src/game/server/entities')
| -rw-r--r-- | src/game/server/entities/character.cpp | 8 | ||||
| -rw-r--r-- | src/game/server/entities/pickup.cpp | 4 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/game/server/entities/character.cpp b/src/game/server/entities/character.cpp index 5dd212a9..ef60cd4c 100644 --- a/src/game/server/entities/character.cpp +++ b/src/game/server/entities/character.cpp @@ -604,7 +604,8 @@ void CCharacter::TickDefered() StartVelX.f = StartVel.x; StartVelY.f = StartVel.y; - dbg_msg("char_core", "STUCK!!! %d %d %d %f %f %f %f %x %x %x %x", + char aBuf[256]; + str_format(aBuf, sizeof(aBuf), "STUCK!!! %d %d %d %f %f %f %f %x %x %x %x", StuckBefore, StuckAfterMove, StuckAfterQuant, @@ -612,6 +613,7 @@ void CCharacter::TickDefered() StartVel.x, StartVel.y, StartPosX.u, StartPosY.u, StartVelX.u, StartVelY.u); + GameServer()->Console()->Print(IConsole::OUTPUT_LEVEL_DEBUG, "game", aBuf); } int Events = m_Core.m_TriggeredEvents; @@ -669,9 +671,11 @@ void CCharacter::Die(int Killer, int Weapon) { int ModeSpecial = GameServer()->m_pController->OnCharacterDeath(this, GameServer()->m_apPlayers[Killer], Weapon); - dbg_msg("game", "kill killer='%d:%s' victim='%d:%s' weapon=%d special=%d", + char aBuf[256]; + str_format(aBuf, sizeof(aBuf), "kill killer='%d:%s' victim='%d:%s' weapon=%d special=%d", Killer, Server()->ClientName(Killer), m_pPlayer->GetCID(), Server()->ClientName(m_pPlayer->GetCID()), Weapon, ModeSpecial); + GameServer()->Console()->Print(IConsole::OUTPUT_LEVEL_DEBUG, "game", aBuf); // send the kill message CNetMsg_Sv_KillMsg Msg; diff --git a/src/game/server/entities/pickup.cpp b/src/game/server/entities/pickup.cpp index 9798e2c3..020b4c60 100644 --- a/src/game/server/entities/pickup.cpp +++ b/src/game/server/entities/pickup.cpp @@ -109,8 +109,10 @@ void CPickup::Tick() if(RespawnTime >= 0) { - dbg_msg("game", "pickup player='%d:%s' item=%d/%d", + char aBuf[256]; + str_format(aBuf, sizeof(aBuf), "pickup player='%d:%s' item=%d/%d", pChr->GetPlayer()->GetCID(), Server()->ClientName(pChr->GetPlayer()->GetCID()), m_Type, m_Subtype); + GameServer()->Console()->Print(IConsole::OUTPUT_LEVEL_DEBUG, "game", aBuf); m_SpawnTick = Server()->Tick() + Server()->TickSpeed() * RespawnTime; } } |