Skip to content
Merged

Dev cur #1240

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion csqc/pmove.qc
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,8 @@ void PM_AddGrenadeExplosion(float itime, entity ent) {
return;

FO_GrenExp exp;
FO_GrenGetExp(ent.fpp.gren_type, exp);
if (!FO_GrenGetExp(ent.fpp.gren_type, exp))
return;

float dmg = exp.dmg;

Expand Down
5 changes: 3 additions & 2 deletions csqc/weapon_predict.qc
Original file line number Diff line number Diff line change
Expand Up @@ -773,6 +773,7 @@ static void WP_InitSniper() {
sight.drawmask = 0;
float index = getmodelindex("progs/sight.spr");
setmodelindex(sight, index);
setsize(sight, [0,0,0], [0,0,0]);

SniperState.sight = sight;
}
Expand Down Expand Up @@ -1384,11 +1385,10 @@ void FPP_Init(int fpp_type, entity proj) {
render_type = FPP_GRENADE;

setmodelindex(proj, FPP_Get(render_type)->modelindex);
setsize(proj, [0,0,0], [0,0,0]);

proj.traileffectnum = FPP_FindTrail(proj);
proj.movetype = desc->movetype;

setsize(proj, [0,0,0], [0,0,0]);
}

DEFCVAR_FLOAT(r_rocketlight, 1);
Expand Down Expand Up @@ -1516,6 +1516,7 @@ static void FPP_ApplyGrenadeProperties(entity proj) {
FO_GrenInfo* gdesc = FO_GrenDesc(proj.fpp.gren_type);

setmodelindex(proj, gdesc->modelindex);
setsize(proj, [0,0,0], [0,0,0]);
proj.skin = gdesc->skin;
proj.avelocity = gdesc->avelocity;
}
Expand Down
8 changes: 4 additions & 4 deletions share/physics.qc
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ static void Phys_Impact(entity e, float dt, float phys_flags) {
if (other.solid == SOLID_NOT)
return;

if (pointcontents(self.origin) == CONTENT_SKY) {
dremove_sent(self);
if (pointcontents(e.origin) == CONTENT_SKY) {
dremove_sent(e);
return;
}

Expand Down Expand Up @@ -315,9 +315,9 @@ void Phys_Sim(entity e) {
return;

float ptime = time + phys_sim_dt;
if (ptime < self.phys_sim_last + SERVER_FRAME_DT)
if (ptime < e.phys_sim_last + SERVER_FRAME_DT)
return;
self.phys_sim_last = ptime;
e.phys_sim_last = ptime;

float held_phys_time = e.phys_time;
vector held_org = e.origin;
Expand Down
3 changes: 3 additions & 0 deletions share/prediction.qc
Original file line number Diff line number Diff line change
Expand Up @@ -988,6 +988,9 @@ void FOProj_Finalize(entity mis, float use_ctime=0) {
csqc_networking = (csqc_networking && fo_config.qc_physics);
}

// After any model updates have occurred
setsize(mis, '0 0 0', '0 0 0');

// We always need to init some of the state here (e.g. phys_time) as we
// always use the physics code client-side.
if (fo_config.qc_physics)
Expand Down