break; // too many replacements
n = n - 1;
- p1 = strstr(msg, "%", p); // NOTE: this destroys msg as it's a tempstring!
- p2 = strstr(msg, "\\", p); // NOTE: this destroys msg as it's a tempstring!
+ p1 = strstrofs(msg, "%", p); // NOTE: this destroys msg as it's a tempstring!
+ p2 = strstrofs(msg, "\\", p); // NOTE: this destroys msg as it's a tempstring!
if (p1 < 0)
p1 = p2;
/**
* @param f -1: cleanup, 0: request, 1: receive
*/
-void GetCvars(int f)
-{SELFPARAM();
+void GetCvars(entity this, int f)
+{
string s = string_null;
if (f > 0)
}
void precache()
-{SELFPARAM();
+{
// gamemode related things
// Precache all player models if desired
builtin_remove(e);
}
-void InitializeEntity(entity e, void() func, float order)
+void InitializeEntity(entity e, void(entity this) func, float order)
{
entity prev, cur;
}
}
void InitializeEntitiesRun()
-{SELFPARAM();
+{
entity startoflist = initialize_entity_first;
initialize_entity_first = NULL;
remove = remove_except_protected;
e.initialize_entity_order = 0;
entity next = e.initialize_entity_next;
e.initialize_entity_next = NULL;
- var void() func = e.initialize_entity;
+ var void(entity this) func = e.initialize_entity;
e.initialize_entity = func_null;
if (e.classname == "initialize_entity")
{
//dprint("Delayed initialization: ", e.classname, "\n");
if (func)
{
- WITH(entity, self, e, func());
+ WITHSELF(e, func(e));
}
else
{
}
// deferred dropping
-void DropToFloor_Handler()
-{SELFPARAM();
+void DropToFloor_Handler(entity this)
+{
builtin_droptofloor();
self.dropped_origin = self.origin;
}