mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
fixed so you can disconnect and reconnet without crashing
This commit is contained in:
parent
2e2d31ccc3
commit
9672fe674f
|
@ -7,9 +7,10 @@ class GAMECLIENT;
|
|||
|
||||
class COMPONENT
|
||||
{
|
||||
protected:
|
||||
GAMECLIENT *client;
|
||||
public:
|
||||
~COMPONENT() {}
|
||||
GAMECLIENT *client;
|
||||
|
||||
virtual void on_statechange(int new_state, int old_state) {};
|
||||
virtual void on_init() {};
|
||||
|
|
|
@ -27,7 +27,6 @@ static void mapscreen_to_group(float center_x, float center_y, MAPITEM_GROUP *gr
|
|||
gfx_mapscreen(points[0], points[1], points[2], points[3]);
|
||||
}
|
||||
|
||||
|
||||
static void envelope_eval(float time_offset, int env, float *channels)
|
||||
{
|
||||
channels[0] = 0;
|
||||
|
@ -56,6 +55,9 @@ static void envelope_eval(float time_offset, int env, float *channels)
|
|||
|
||||
void MAPLAYERS::on_render()
|
||||
{
|
||||
if(client_state() != CLIENTSTATE_ONLINE)
|
||||
return;
|
||||
|
||||
vec2 center = gameclient.camera->center;
|
||||
//float center_x = gameclient.camera->center.x;
|
||||
//float center_y = gameclient.camera->center.y;
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
#include <game/generated/gc_data.hpp>
|
||||
|
||||
#include <game/client/gameclient.hpp>
|
||||
//#include <game/client/gc_anim.hpp>
|
||||
#include <game/client/gc_client.hpp>
|
||||
|
||||
#include "motd.hpp"
|
||||
|
|
Loading…
Reference in a new issue