Skip to content

Commit ecebb32

Browse files
committed
Removed some TODOs
1 parent f912f82 commit ecebb32

File tree

5 files changed

+34
-73
lines changed

5 files changed

+34
-73
lines changed

src/core/modules/effects/effects_wrap_python.cpp

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -77,19 +77,6 @@ void export_effects()
7777
"Set the SuppressEvent state.",
7878
args("state")
7979
)
80-
81-
/*
82-
TODO: CBaseEntity
83-
.def("set_suppress_host",
84-
&IPredictionSystem::SetSuppressHost
85-
)
86-
87-
TODO: CBaseEntity
88-
.def("get_suppress_host",
89-
&IPredictionSystem::GetSuppressHost,
90-
reference_existing_object_policy()
91-
)
92-
*/
9380

9481
.def("can_predict",
9582
&IPredictionSystem::CanPredict
@@ -103,13 +90,6 @@ void export_effects()
10390
&IPredictionSystem::SuppressEvents
10491
)
10592
.staticmethod("suppress_events")
106-
107-
/*
108-
.def("suppress_host_events",
109-
&IPredictionSystem::SuppressHostEvents
110-
)
111-
.staticmethod("suppress_host_events")
112-
*/
11393
;
11494

11595
class_<IEffects, bases<IPredictionSystem>, boost::noncopyable>("_Effects", no_init)

src/core/modules/engine/engine1/engine_wrap_python.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,6 @@ void IVEngineServer_Visitor(T cls)
7373
.def("get_server_version",
7474
&IVEngineServer::GetServerVersion
7575
)
76-
77-
/*
78-
TODO: void*
79-
.def("get_replay",
80-
&IVEngineServer::GetReplay
81-
)
82-
*/
8376
;
8477
}
8578

src/core/modules/engine/engine_wrap_python.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -914,7 +914,7 @@ class IEntityEnumeratorWrap: public IEntityEnumerator, public wrapper<IEntityEnu
914914
class IEngineTraceExt
915915
{
916916
public:
917-
static list GetPointContents(IEngineTrace* pEngineTrace, const Vector& vec)
917+
static tuple GetPointContents(IEngineTrace* pEngineTrace, const Vector& vec)
918918
{
919919
IHandleEntity** ppEntities = new IHandleEntity*[gpGlobals->maxEntities];
920920
memset(ppEntities, NULL, sizeof(IHandleEntity*) * gpGlobals->maxEntities);
@@ -929,13 +929,8 @@ class IEngineTraceExt
929929
entities.append(ptr(ppEntities[i]));
930930
}
931931
}
932-
933932
delete ppEntities;
934-
list result;
935-
result.append(iMask);
936-
result.append(entities);
937-
938-
return result;
933+
return make_tuple(iMask, entities);
939934
}
940935
};
941936

src/core/modules/globals/globals_wrap_python.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,9 +183,6 @@ void export_globals()
183183

184184
.NOT_IMPLEMENTED_ATTR("map_group_name")
185185
.NOT_IMPLEMENTED_ATTR("server_count")
186-
187-
// TODO: Return a list of edicts or remove it.
188-
.NOT_IMPLEMENTED_ATTR("edicts")
189186
);
190187

191188
scope().attr("GlobalVars") = object(ptr(gpGlobals));

src/core/modules/mathlib/mathlib_wrap_python.cpp

Lines changed: 32 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,6 @@ void export_vector()
242242
//-----------------------------------------------------------------------------
243243
void export_qangle()
244244
{
245-
// TODO: Documentation
246245
class_<QAngle>("QAngle")
247246
.def(init<float, float, float>())
248247

@@ -258,31 +257,30 @@ void export_qangle()
258257
&QAngle::z
259258
)
260259

261-
.def("init",
262-
&QAngle::Init,
263-
"Initializes the QAngle instance with the given values.",
264-
args("x", "y", "z")
265-
)
266-
267260
.def("random",
268261
&QAngle::Random,
269-
args("min_val", "max_val")
262+
args("min_val", "max_val"),
263+
"Generates some random values between <min_val> and <max_val>."
270264
)
271265

272266
.def("is_valid",
273-
&QAngle::IsValid
267+
&QAngle::IsValid,
268+
"Returns True if the angle is valid."
274269
)
275270

276271
.def("invalidate",
277-
&QAngle::Invalidate
272+
&QAngle::Invalidate,
273+
"Invalidates the angle."
278274
)
279275

280276
.def("__getitem__",
281-
&GetItemIndexer<QAngle, float, 0, 2>
277+
&GetItemIndexer<QAngle, float, 0, 2>,
278+
"Returns the value at the given index."
282279
)
283280

284281
.def("__setitem__",
285-
&SetItemIndexer<QAngle, float, 0, 2>
282+
&SetItemIndexer<QAngle, float, 0, 2>,
283+
"Sets the value at the given index."
286284
)
287285

288286
.def(self == self)
@@ -294,11 +292,13 @@ void export_qangle()
294292
.def(self /= other<float>())
295293

296294
.def("get_length",
297-
&QAngle::Length
295+
&QAngle::Length,
296+
"Returns the length of the angle."
298297
)
299298

300299
.def("get_length_sqr",
301-
&QAngle::LengthSqr
300+
&QAngle::LengthSqr,
301+
"Returns the square of the angle's length."
302302
)
303303

304304
.def(self + self)
@@ -313,33 +313,31 @@ void export_qangle()
313313
//-----------------------------------------------------------------------------
314314
void export_quaternion()
315315
{
316-
// TODO: Documentation
317316
class_<Quaternion>("Quaternion")
318317
.def(init<float, float, float, float>())
319318
.def(init<RadianEuler>())
320319

321-
.def("init",
322-
&Quaternion::Init,
323-
args("x", "y", "z", "w")
324-
)
325-
326320
.def("is_valid",
327-
&Quaternion::IsValid
321+
&Quaternion::IsValid,
322+
"Returns True if all values are valid."
328323
)
329324

330325
.def("invalidate",
331-
&Quaternion::Invalidate
326+
&Quaternion::Invalidate,
327+
"Invalidates all values."
332328
)
333329

334330
.def(self == self)
335331
.def(self != self)
336332

337333
.def("__getitem__",
338-
&GetItemIndexer<Quaternion, float, 0, 3>
334+
&GetItemIndexer<Quaternion, float, 0, 3>,
335+
"Returns the value at the given index."
339336
)
340337

341338
.def("__setitem__",
342-
&SetItemIndexer<Quaternion, float, 0, 3>
339+
&SetItemIndexer<Quaternion, float, 0, 3>,
340+
"Sets the value at the given index."
343341
)
344342

345343
.def_readwrite("x",
@@ -382,8 +380,6 @@ void export_cplane_t()
382380
.def_readwrite("signbits",
383381
&cplane_t::signbits
384382
)
385-
386-
// TODO: byte pad[2];
387383
;
388384
}
389385

@@ -392,34 +388,34 @@ void export_cplane_t()
392388
//-----------------------------------------------------------------------------
393389
void export_radian_euler()
394390
{
395-
// TODO: Documentation
396391
class_<RadianEuler>("RadianEuler")
397392
.def(init<float, float, float>())
398393
.def(init<Quaternion>())
399394
.def(init<QAngle>())
400395

401-
.def("init",
402-
&RadianEuler::Init
403-
)
404-
405396
.def("to_qangle",
406-
&RadianEuler::ToQAngle
397+
&RadianEuler::ToQAngle,
398+
"Converts the instance to a QAngle instance."
407399
)
408400

409401
.def("is_valid",
410-
&RadianEuler::IsValid
402+
&RadianEuler::IsValid,
403+
"Returns True if all values are valid."
411404
)
412405

413406
.def("invalidate",
414-
&RadianEuler::Invalidate
407+
&RadianEuler::Invalidate,
408+
"Invalidates all values."
415409
)
416410

417411
.def("__getitem__",
418-
&GetItemIndexer<RadianEuler, float, 0, 2>
412+
&GetItemIndexer<RadianEuler, float, 0, 2>,
413+
"Returns the value at the given index."
419414
)
420415

421416
.def("__setitem__",
422-
&SetItemIndexer<RadianEuler, float, 0, 2>
417+
&SetItemIndexer<RadianEuler, float, 0, 2>,
418+
"Sets the value at the given index."
423419
)
424420

425421
.def_readwrite("x",

0 commit comments

Comments
 (0)