-#define G_MODEL_INIT(sol) \
- if(self.geomtype) if(autocvar_physics_ode && checkextension("DP_PHYSICS_ODE")) self.movetype = MOVETYPE_PHYSICS; \
- if(!self.scale) self.scale = self.modelscale; \
- SetBrushEntityModel(); \
- self.use = g_model_setcolormaptoactivator; \
- InitializeEntity(self, g_model_dropbyspawnflags, INITPRIO_DROPTOFLOOR); \
- if(!self.solid) self.solid = (sol); else if(self.solid < 0) self.solid = SOLID_NOT;
-
-#define G_CLIENTMODEL_INIT(sol) \
- if(self.geomtype) if(autocvar_physics_ode && checkextension("DP_PHYSICS_ODE")) self.movetype = MOVETYPE_PHYSICS; \
- if(!self.scale) self.scale = self.modelscale; \
- SetBrushEntityModel(); \
- self.use = g_clientmodel_use; \
- InitializeEntity(self, g_clientmodel_dropbyspawnflags, INITPRIO_DROPTOFLOOR); \
- if(!self.solid) self.solid = (sol); else if(self.solid < 0) self.solid = SOLID_NOT; \
- if(!self.bgmscriptsustain) self.bgmscriptsustain = 1; else if(self.bgmscriptsustain < 0) self.bgmscriptsustain = 0; \
- Net_LinkEntity(self, true, 0, g_clientmodel_genericsendentity); \
- self.default_solid = sol;
+#define G_MODEL_INIT(ent,sol) \
+ if(ent.geomtype) if(autocvar_physics_ode && checkextension("DP_PHYSICS_ODE")) set_movetype(ent, MOVETYPE_PHYSICS); \
+ if(!ent.scale) ent.scale = ent.modelscale; \
+ SetBrushEntityModel(ent); \
+ ent.use = g_model_setcolormaptoactivator; \
+ InitializeEntity(ent, g_model_dropbyspawnflags, INITPRIO_DROPTOFLOOR); \
+ if(!ent.solid) ent.solid = (sol); else if(ent.solid < 0) ent.solid = SOLID_NOT;
+
+#define G_CLIENTMODEL_INIT(ent,sol) \
+ if(ent.geomtype) if(autocvar_physics_ode && checkextension("DP_PHYSICS_ODE")) set_movetype(ent, MOVETYPE_PHYSICS); \
+ if(!ent.scale) ent.scale = ent.modelscale; \
+ SetBrushEntityModel(ent); \
+ ent.use = g_clientmodel_use; \
+ InitializeEntity(ent, g_clientmodel_dropbyspawnflags, INITPRIO_DROPTOFLOOR); \
+ if(!ent.solid) ent.solid = (sol); else if(ent.solid < 0) ent.solid = SOLID_NOT; \
+ if(!ent.bgmscriptsustain) ent.bgmscriptsustain = 1; else if(ent.bgmscriptsustain < 0) ent.bgmscriptsustain = 0; \
+ Net_LinkEntity(ent, true, 0, g_clientmodel_genericsendentity); \
+ ent.default_solid = sol;