Skip to content

Commit 4c32b52

Browse files
committed
Some other fixes for CS:GO
1 parent 2b00bc0 commit 4c32b52

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

src/core/modules/entities/entities_wrap_python.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,9 +353,12 @@ void export_edict()
353353
&CBaseEdict::m_NetworkSerialNumber
354354
)
355355

356+
/*
357+
// TODO: Missing on CS:GO
356358
.def_readwrite("index",
357359
&CBaseEdict::m_iIndex
358360
)
361+
*/
359362

360363
.def_readwrite("networkable",
361364
&CBaseEdict::m_pNetworkable
@@ -418,10 +421,13 @@ void export_edict()
418421
)
419422

420423
// Class attributes
424+
/*
425+
// TODO: Missing on CS:GO
421426
.def_readwrite("free_time",
422427
&edict_t::freetime,
423428
"The server timestampe at which the edict was freed."
424429
)
430+
*/
425431
;
426432
}
427433

src/core/modules/events/events_wrap_python.cpp

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@
3030
#include "igameevents.h"
3131
#include "modules/export_main.h"
3232

33+
#ifndef EVENT_DEBUG_ID_INIT
34+
#define EVENT_DEBUG_ID_INIT 42
35+
#endif
36+
3337
//---------------------------------------------------------------------------------
3438
// This is the IGameEventListener2 callback class. It allows python to subclass
3539
// IGameEventListener2 then pass an instance of that to CGameEventManager.
@@ -43,6 +47,11 @@ class CGameEventListener2: public IGameEventListener2, public wrapper<IGameEvent
4347
get_override("fire_game_event")(ptr(pEvent));
4448
END_BOOST_PY()
4549
}
50+
51+
virtual int GetEventDebugID()
52+
{
53+
return EVENT_DEBUG_ID_INIT;
54+
}
4655
};
4756

4857
//---------------------------------------------------------------------------------
@@ -173,7 +182,9 @@ void export_igameeventlistener()
173182
"Fires the given game event."
174183
)
175184

176-
.NOT_IMPLEMENTED("get_event_debug_id")
185+
.def("get_event_debug_id",
186+
&CGameEventListener2::GetEventDebugID
187+
)
177188
;
178189
}
179190

src/core/modules/mathlib/mathlib_wrap_python.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ void export_vector()
6060
// TODO: Rename
6161
class_<Vector>("CVector")
6262
.def(init<float, float, float>())
63-
.def(init<float>())
63+
// TODO: Missing on CS:GO
64+
//.def(init<float>())
6465

6566
// Members
6667
.def_readwrite("x",

0 commit comments

Comments
 (0)