diff --git a/data/languages/czech.txt b/data/languages/czech.txt index d13c140aa..21e937d65 100644 --- a/data/languages/czech.txt +++ b/data/languages/czech.txt @@ -456,5 +456,10 @@ Sudden Death %ds left == %ds left -##### old translations #### +error loading demo +== error loading demo +Error +== Error + +##### old translations #### diff --git a/data/languages/dutch.txt b/data/languages/dutch.txt index f0fd647ef..4f0f71850 100644 --- a/data/languages/dutch.txt +++ b/data/languages/dutch.txt @@ -455,4 +455,10 @@ Sudden Death %ds left == %ds left +error loading demo +== error loading demo + +Error +== Error + ##### old translations #### diff --git a/data/languages/french.txt b/data/languages/french.txt index 9f0fdee32..390af2c6b 100644 --- a/data/languages/french.txt +++ b/data/languages/french.txt @@ -456,5 +456,10 @@ Sudden Death %ds left == %ds left -##### old translations #### +error loading demo +== error loading demo +Error +== Error + +##### old translations #### diff --git a/data/languages/german.txt b/data/languages/german.txt index 684ce4ee3..300a162ac 100644 --- a/data/languages/german.txt +++ b/data/languages/german.txt @@ -454,8 +454,13 @@ Sudden Death %ds left == Noch %ds +error loading demo +== Fehler beim Laden der Demo, die Datei ist nicht gültig. + +Error +== Fehlgeschlagen + ##### needs translation #### ##### old translations #### - diff --git a/data/languages/italian.txt b/data/languages/italian.txt index 806da7c1b..24c54c7a3 100644 --- a/data/languages/italian.txt +++ b/data/languages/italian.txt @@ -456,5 +456,10 @@ Sudden Death %ds left == %ds left -##### old translations #### +error loading demo +== error loading demo +Error +== Error + +##### old translations #### diff --git a/data/languages/portuguese.txt b/data/languages/portuguese.txt index 13f7cc1db..c7a83c483 100644 --- a/data/languages/portuguese.txt +++ b/data/languages/portuguese.txt @@ -456,5 +456,10 @@ Sudden Death %ds left == %ds left -##### old translations #### +error loading demo +== error loading demo +Error +== Error + +##### old translations #### diff --git a/data/languages/swedish.txt b/data/languages/swedish.txt index c5eee40a7..e36c84f72 100644 --- a/data/languages/swedish.txt +++ b/data/languages/swedish.txt @@ -456,5 +456,10 @@ Sudden Death %ds left == %ds left -##### old translations #### +error loading demo +== error loading demo +Error +== Error + +##### old translations #### diff --git a/src/game/client/components/menus_demo.cpp b/src/game/client/components/menus_demo.cpp index 62c03a926..f3a6bc889 100644 --- a/src/game/client/components/menus_demo.cpp +++ b/src/game/client/components/menus_demo.cpp @@ -452,7 +452,7 @@ void CMenus::RenderDemoList(CUIRect MainView) { const char *pError = Client()->DemoPlayer_Play(m_lDemos[s_SelectedItem].m_aFilename); if(pError) - PopupMessage(Localize("Error"), pError, Localize("Ok")); + PopupMessage(Localize("Error"), Localize(pError), Localize("Ok")); } } diff --git a/src/game/server/entities/character.cpp b/src/game/server/entities/character.cpp index 839088dda..77d8f462d 100644 --- a/src/game/server/entities/character.cpp +++ b/src/game/server/entities/character.cpp @@ -40,7 +40,7 @@ MACRO_ALLOC_POOL_ID_IMPL(CCharacter, MAX_CLIENTS) CCharacter::CCharacter(CGameWorld *pWorld) : CEntity(pWorld, NETOBJTYPE_CHARACTER) { - m_ProximityRadius = g_CharPhysSize; + m_ProximityRadius = ms_PhysSize; m_Health = 0; m_Armor = 0; } @@ -101,9 +101,9 @@ void CCharacter::SetWeapon(int W) bool CCharacter::IsGrounded() { - if(GameServer()->Collision()->CheckPoint(m_Pos.x+g_CharPhysSize/2, m_Pos.y+g_CharPhysSize/2+5)) + if(GameServer()->Collision()->CheckPoint(m_Pos.x+m_ProximityRadius/2, m_Pos.y+m_ProximityRadius/2+5)) return true; - if(GameServer()->Collision()->CheckPoint(m_Pos.x-g_CharPhysSize/2, m_Pos.y+g_CharPhysSize/2+5)) + if(GameServer()->Collision()->CheckPoint(m_Pos.x-m_ProximityRadius/2, m_Pos.y+m_ProximityRadius/2+5)) return true; return false; } @@ -144,7 +144,7 @@ void CCharacter::HandleNinja() // Set velocity m_Core.m_Vel = m_Ninja.m_ActivationDir * g_pData->m_Weapons.m_Ninja.m_Velocity; vec2 OldPos = m_Pos; - GameServer()->Collision()->MoveBox(&m_Core.m_Pos, &m_Core.m_Vel, vec2(g_CharPhysSize, g_CharPhysSize), 0.f); + GameServer()->Collision()->MoveBox(&m_Core.m_Pos, &m_Core.m_Vel, vec2(m_ProximityRadius, m_ProximityRadius), 0.f); // reset velocity so the client doesn't predict stuff m_Core.m_Vel = vec2(0.f, 0.f); @@ -153,7 +153,7 @@ void CCharacter::HandleNinja() { CCharacter *aEnts[64]; vec2 Dir = m_Pos - OldPos; - float Radius = g_CharPhysSize * 2.0f; + float Radius = m_ProximityRadius * 2.0f; vec2 Center = OldPos + Dir * 0.5f; int Num = GameServer()->m_World.FindEntities(Center, Radius, (CEntity**)aEnts, 64, NETOBJTYPE_CHARACTER); @@ -173,7 +173,7 @@ void CCharacter::HandleNinja() continue; // check so we are sufficiently close - if (distance(aEnts[i]->m_Pos, m_Pos) > (g_CharPhysSize * 2.0f)) + if (distance(aEnts[i]->m_Pos, m_Pos) > (m_ProximityRadius * 2.0f)) continue; // Hit a player, give him damage and stuffs... @@ -277,7 +277,7 @@ void CCharacter::FireWeapon() return; } - vec2 ProjStartPos = m_Pos+Direction*g_CharPhysSize*0.75f; + vec2 ProjStartPos = m_Pos+Direction*m_ProximityRadius*0.75f; switch(m_ActiveWeapon) { @@ -289,7 +289,7 @@ void CCharacter::FireWeapon() CCharacter *aEnts[64]; int Hits = 0; - int Num = GameServer()->m_World.FindEntities(ProjStartPos, g_CharPhysSize*0.5f, (CEntity**)aEnts, + int Num = GameServer()->m_World.FindEntities(ProjStartPos, m_ProximityRadius*0.5f, (CEntity**)aEnts, 64, NETOBJTYPE_CHARACTER); for (int i = 0; i < Num; ++i) @@ -543,10 +543,10 @@ void CCharacter::Tick() m_Core.Tick(true); // handle death-tiles - if(GameServer()->Collision()->GetCollisionAt(m_Pos.x+g_CharPhysSize/3.f, m_Pos.y-g_CharPhysSize/3.f)&CCollision::COLFLAG_DEATH || - GameServer()->Collision()->GetCollisionAt(m_Pos.x+g_CharPhysSize/3.f, m_Pos.y+g_CharPhysSize/3.f)&CCollision::COLFLAG_DEATH || - GameServer()->Collision()->GetCollisionAt(m_Pos.x-g_CharPhysSize/3.f, m_Pos.y-g_CharPhysSize/3.f)&CCollision::COLFLAG_DEATH || - GameServer()->Collision()->GetCollisionAt(m_Pos.x-g_CharPhysSize/3.f, m_Pos.y+g_CharPhysSize/3.f)&CCollision::COLFLAG_DEATH) + if(GameServer()->Collision()->GetCollisionAt(m_Pos.x+m_ProximityRadius/3.f, m_Pos.y-m_ProximityRadius/3.f)&CCollision::COLFLAG_DEATH || + GameServer()->Collision()->GetCollisionAt(m_Pos.x+m_ProximityRadius/3.f, m_Pos.y+m_ProximityRadius/3.f)&CCollision::COLFLAG_DEATH || + GameServer()->Collision()->GetCollisionAt(m_Pos.x-m_ProximityRadius/3.f, m_Pos.y-m_ProximityRadius/3.f)&CCollision::COLFLAG_DEATH || + GameServer()->Collision()->GetCollisionAt(m_Pos.x-m_ProximityRadius/3.f, m_Pos.y+m_ProximityRadius/3.f)&CCollision::COLFLAG_DEATH) { Die(m_pPlayer->GetCID(), WEAPON_WORLD); } diff --git a/src/game/server/entities/character.h b/src/game/server/entities/character.h index 30c6586fc..a1add9824 100644 --- a/src/game/server/entities/character.h +++ b/src/game/server/entities/character.h @@ -7,9 +7,6 @@ #include -//character's size -const int g_CharPhysSize = 28; - enum { WEAPON_GAME = -3, // team switching etc @@ -22,6 +19,9 @@ class CCharacter : public CEntity MACRO_ALLOC_POOL_ID() public: + //character's size + static const int ms_PhysSize = 28; + CCharacter(CGameWorld *pWorld); virtual void Reset(); diff --git a/src/game/server/gamemodes/ctf.cpp b/src/game/server/gamemodes/ctf.cpp index 705d21acf..37e603ef0 100644 --- a/src/game/server/gamemodes/ctf.cpp +++ b/src/game/server/gamemodes/ctf.cpp @@ -105,7 +105,7 @@ void CGameControllerCTF::Tick() if(m_apFlags[fi^1] && m_apFlags[fi^1]->m_AtStand) { - if(distance(F->m_Pos, m_apFlags[fi^1]->m_Pos) < 32) + if(distance(F->m_Pos, m_apFlags[fi^1]->m_Pos) < CFlag::ms_PhysSize + CCharacter::ms_PhysSize) { // CAPTURE! \o/ m_aTeamscore[fi^1] += 100; @@ -136,7 +136,7 @@ void CGameControllerCTF::Tick() else { CCharacter *apCloseCCharacters[MAX_CLIENTS]; - int Num = GameServer()->m_World.FindEntities(F->m_Pos, 32.0f-(float)g_CharPhysSize, (CEntity**)apCloseCCharacters, MAX_CLIENTS, NETOBJTYPE_CHARACTER); + int Num = GameServer()->m_World.FindEntities(F->m_Pos, CFlag::ms_PhysSize, (CEntity**)apCloseCCharacters, MAX_CLIENTS, NETOBJTYPE_CHARACTER); for(int i = 0; i < Num; i++) { if(!apCloseCCharacters[i]->IsAlive() || apCloseCCharacters[i]->GetPlayer()->GetTeam() == -1 || GameServer()->Collision()->IntersectLine(F->m_Pos, apCloseCCharacters[i]->m_Pos, NULL, NULL)) @@ -199,7 +199,7 @@ void CGameControllerCTF::Tick() else { F->m_Vel.y += GameServer()->m_World.m_Core.m_Tuning.m_Gravity; - GameServer()->Collision()->MoveBox(&F->m_Pos, &F->m_Vel, vec2(F->m_PhysSize, F->m_PhysSize), 0.5f); + GameServer()->Collision()->MoveBox(&F->m_Pos, &F->m_Vel, vec2(F->ms_PhysSize, F->ms_PhysSize), 0.5f); } } } @@ -211,7 +211,7 @@ CFlag::CFlag(CGameWorld *pGameWorld, int Team) : CEntity(pGameWorld, NETOBJTYPE_FLAG) { m_Team = Team; - m_ProximityRadius = m_PhysSize; + m_ProximityRadius = ms_PhysSize; m_pCarryingCharacter = 0x0; m_GrabTick = 0; diff --git a/src/game/server/gamemodes/ctf.h b/src/game/server/gamemodes/ctf.h index afb6feee1..767207e02 100644 --- a/src/game/server/gamemodes/ctf.h +++ b/src/game/server/gamemodes/ctf.h @@ -20,7 +20,7 @@ public: class CFlag : public CEntity { public: - static const int m_PhysSize = 14; + static const int ms_PhysSize = 14; CCharacter *m_pCarryingCharacter; vec2 m_Vel; vec2 m_StandPos;