mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Merge remote branch 'upstream/master
This commit is contained in:
commit
8b15558f5d
|
@ -456,5 +456,10 @@ Sudden Death
|
|||
%ds left
|
||||
== %ds left
|
||||
|
||||
##### old translations ####
|
||||
error loading demo
|
||||
== error loading demo
|
||||
|
||||
Error
|
||||
== Error
|
||||
|
||||
##### old translations ####
|
||||
|
|
|
@ -455,4 +455,10 @@ Sudden Death
|
|||
%ds left
|
||||
== %ds left
|
||||
|
||||
error loading demo
|
||||
== error loading demo
|
||||
|
||||
Error
|
||||
== Error
|
||||
|
||||
##### old translations ####
|
||||
|
|
|
@ -456,5 +456,10 @@ Sudden Death
|
|||
%ds left
|
||||
== %ds left
|
||||
|
||||
##### old translations ####
|
||||
error loading demo
|
||||
== error loading demo
|
||||
|
||||
Error
|
||||
== Error
|
||||
|
||||
##### old translations ####
|
||||
|
|
|
@ -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 ####
|
||||
|
||||
|
|
|
@ -456,5 +456,10 @@ Sudden Death
|
|||
%ds left
|
||||
== %ds left
|
||||
|
||||
##### old translations ####
|
||||
error loading demo
|
||||
== error loading demo
|
||||
|
||||
Error
|
||||
== Error
|
||||
|
||||
##### old translations ####
|
||||
|
|
|
@ -456,5 +456,10 @@ Sudden Death
|
|||
%ds left
|
||||
== %ds left
|
||||
|
||||
##### old translations ####
|
||||
error loading demo
|
||||
== error loading demo
|
||||
|
||||
Error
|
||||
== Error
|
||||
|
||||
##### old translations ####
|
||||
|
|
|
@ -456,5 +456,10 @@ Sudden Death
|
|||
%ds left
|
||||
== %ds left
|
||||
|
||||
##### old translations ####
|
||||
error loading demo
|
||||
== error loading demo
|
||||
|
||||
Error
|
||||
== Error
|
||||
|
||||
##### old translations ####
|
||||
|
|
|
@ -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"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -7,9 +7,6 @@
|
|||
|
||||
#include <game/gamecore.h>
|
||||
|
||||
//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();
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue