vector old_movement = PHYS_CS(this).movement;
PHYS_CS(this).movement_x = old_movement_y;
- if(this.viewloc.spawnflags & VIEWLOC_FREEMOVE)
+ if((this.viewloc.spawnflags & VIEWLOC_FREEMOVE) && !(time < this.ladder_time))
PHYS_CS(this).movement_y = old_movement_x;
else
PHYS_CS(this).movement_y = 0;
vector forward = vectoangles(normalize(level_end - level_start));
vector backward = vectoangles(normalize(level_start - level_end));
- if((this.viewloc.spawnflags & VIEWLOC_FREEMOVE) && this.angles_y < 0)
+ if((this.viewloc.spawnflags & VIEWLOC_FREEMOVE) && this.angles_y < 0 && !(time < this.ladder_time))
PHYS_CS(this).movement_y = -PHYS_CS(this).movement_y;
if(this.viewloc.spawnflags & VIEWLOC_FREEAIM)
if(PHYS_CS(this).movement_x > 0) // right
this.angles_y = forward.y;
}
-
+ #if 0
//if(!PHYS_INPUT_BUTTON_CROUCH(this) && !IS_DUCKED(this))
if(!(this.viewloc.spawnflags & VIEWLOC_FREEMOVE))
{
//else { input_buttons &= ~16; this.flags &= ~FL_DUCKED; }
#endif
}
+ #endif
}
}
this.viewloc = NULL;
if(this.viewloc.entnum != this.tag_networkviewloc)
- if(this.tag_networkviewloc == 0)
- this.viewloc = NULL;
- else
- this.viewloc = findfloat(NULL, entnum, this.tag_networkviewloc);
+ {
+ if(this.tag_networkviewloc == 0)
+ this.viewloc = NULL;
+ else
+ this.viewloc = findfloat(NULL, entnum, this.tag_networkviewloc);
+ }
}
vector CursorToWorldCoord(vector mpos)
}
}
+STATIC_INIT_LATE(viewloc_cursor)
+{
+ // fix the mouse position on init so it isn't in the corner
+ viewloc_mousepos = '0.5 0 0' * autocvar_vid_conwidth + '0 0.5 0' * autocvar_vid_conheight;
+}
+
#endif