5680: Remove CFlag dead code (fixes #5677) r=Robyt3 a=def-

<!-- What is the motivation for the changes of this pull request -->

## Checklist

- [ ] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test (especially base/) or added coverage to integration test
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: def <dennis@felsin9.de>
This commit is contained in:
bors[bot] 2022-07-31 08:37:56 +00:00 committed by GitHub
commit 34fb372097
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 3 additions and 103 deletions

View file

@ -50,3 +50,6 @@ jobs:
run: |
pylint --version
find . -type f -name "*.py" -not -path './ddnet-libs/*' -not -path './googletest-src/*' -print0 | xargs -0 pylint
- name: Unused headers
run: |
find src -name '*.h' | while read i; do grep -r -q $(basename $i) || (echo "Header file $i is unused" && exit 1); done

View file

@ -1948,7 +1948,6 @@ if(CLIENT)
backend/opengl/opengl_sl_program.cpp
backend/opengl/opengl_sl_program.h
backend/opengles/backend_opengles.cpp
backend/opengles/backend_opengles.h
backend/opengles/backend_opengles3.cpp
backend/opengles/backend_opengles3.h
backend/opengles/gles_class_defines.h
@ -2307,8 +2306,6 @@ if(SERVER)
entities/dragger.h
entities/dragger_beam.cpp
entities/dragger_beam.h
entities/flag.cpp
entities/flag.h
entities/gun.cpp
entities/gun.h
entities/laser.cpp

View file

@ -1,23 +0,0 @@
#ifndef ENGINE_CLIENT_BACKEND_OPENGLES_BACKEND_OPENGLES_H
#define ENGINE_CLIENT_BACKEND_OPENGLES_BACKEND_OPENGLES_H
#include <base/detect.h>
#if defined(CONF_BACKEND_OPENGL_ES) || defined(CONF_BACKEND_OPENGL_ES3)
#include <engine/client/backend_sdl.h>
#define GLES_CLASS_DEFINES_DO_DEFINE
#include "gles_class_defines.h"
#undef GLES_CLASS_DEFINES_DO_DEFINE
#define BACKEND_AS_OPENGL_ES 1
#include <engine/client/backend/opengl/backend_opengl.h>
#undef BACKEND_AS_OPENGL_ES
#include "gles_class_defines.h"
#endif
#endif

View file

@ -1,47 +0,0 @@
/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
/* If you are missing that file, acquire a complete release at teeworlds.com. */
/*
#include "flag.h"
#include <game/server/gamecontext.h>
CFlag::CFlag(CGameWorld *pGameWorld, int Team)
: CEntity(pGameWorld, CGameWorld::ENTTYPE_FLAG)
{
m_Team = Team;
m_ProximityRadius = ms_PhysSize;
m_pCarryingCharacter = NULL;
m_GrabTick = 0;
Reset();
}
void CFlag::Reset()
{
m_pCarryingCharacter = NULL;
m_AtStand = 1;
m_Pos = m_StandPos;
m_Vel = vec2(0,0);
m_GrabTick = 0;
}
void CFlag::TickPaused()
{
++m_DropTick;
if(m_GrabTick)
++m_GrabTick;
}
void CFlag::Snap(int SnappingClient)
{
if(NetworkClipped(SnappingClient))
return;
CNetObj_Flag *pFlag = (CNetObj_Flag *)Server()->SnapNewItem(NETOBJTYPE_FLAG, m_Team, sizeof(CNetObj_Flag));
if(!pFlag)
return;
pFlag->m_X = (int)m_Pos.x;
pFlag->m_Y = (int)m_Pos.y;
pFlag->m_Team = m_Team;
}
*/

View file

@ -1,30 +0,0 @@
/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
/* If you are missing that file, acquire a complete release at teeworlds.com. */
/*
#ifndef GAME_SERVER_ENTITIES_FLAG_H
#define GAME_SERVER_ENTITIES_FLAG_H
#include <game/server/entity.h>
class CFlag : public CEntity
{
public:
static const int ms_PhysSize = 14;
CCharacter *m_pCarryingCharacter;
vec2 m_Vel;
vec2 m_StandPos;
int m_Team;
int m_AtStand;
int m_DropTick;
int m_GrabTick;
CFlag(CGameWorld *pGameWorld, int Team);
virtual void Reset();
virtual void TickPaused();
virtual void Snap(int SnappingClient);
};
#endif
*/