X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fmapobjects%2Fmodels.qc;h=18d033663eaff85541fadfffe49dcbf849370484;hb=2ccfbaf3d871db94af3195383a57ff738abaa07a;hp=9fb61c230fac807e913d5293120cf329f449b15b;hpb=95da641845d520e3f59e5d47f418859a60704de7;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/mapobjects/models.qc b/qcsrc/common/mapobjects/models.qc index 9fb61c230..18d033663 100644 --- a/qcsrc/common/mapobjects/models.qc +++ b/qcsrc/common/mapobjects/models.qc @@ -41,6 +41,11 @@ void g_clientmodel_setcolormaptoactivator(entity this, entity actor, entity trig void g_clientmodel_use(entity this, entity actor, entity trigger) { + // Flag to set func_clientwall state + // 1 == deactivate, 2 == activate, 0 == do nothing + if(this.classname == "func_clientwall" || this.classname == "func_clientillusionary") + this.antiwall_flag = trigger.antiwall_flag; + if (this.antiwall_flag == 1) { this.inactive = 1; @@ -161,21 +166,24 @@ bool g_clientmodel_genericsendentity(entity this, entity to, int sf) #define G_MODEL_INIT(ent,sol) \ - if(ent.geomtype) if(autocvar_physics_ode && checkextension("DP_PHYSICS_ODE")) set_movetype(ent, MOVETYPE_PHYSICS); \ + if(ent.geomtype && autocvar_physics_ode && checkextension("DP_PHYSICS_ODE")) set_movetype(ent, MOVETYPE_PHYSICS); \ if(!ent.scale) ent.scale = ent.modelscale; \ - SetBrushEntityModel(ent); \ + SetBrushEntityModel(ent,true); \ 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; + 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.geomtype && autocvar_physics_ode && checkextension("DP_PHYSICS_ODE")) set_movetype(ent, MOVETYPE_PHYSICS); \ if(!ent.scale) ent.scale = ent.modelscale; \ - SetBrushEntityModel(ent); \ + SetBrushEntityModel(ent,true); \ 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; \ + 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;