[FTE] .customphysics in CSCQ
Posted: Sat Jan 07, 2017 4:02 pm
I'm trying to understand custom physics in FTE though CSQC but I'm stuck.
Definition
So, If I set
when player is spawned, as Spike did in his purecsqc mod, and then in CSQC_Input_Frame() I simply write
Player stands at mid air, doing nothing.
But, if I include pmove.qc from purecsqc mod and I launch
Player will fall and walk and stuff..
No need to mention that I tried, re-tried and tried again to understand why that pmove.qc is so special but, honestly, it's too much complicated for me.
Inside PM_Run, it launches Acceleration, run commands and acceleration again, but I didn't understand why.
Since pmove.qc it's GPL licensed and overcomplicated (at least for me) I'd like to start from basics: make player fall down.
If I change code to
It works. Same story for velocity_x and velocity_y. They seem blocked somehow.
Any suggestions, folks?
Definition
Code: Select all
.void() customphysics; /* Called once each physics frame,
overriding the entity's .movetype field and associated logic.
You'll probably want to use tracebox to move it through the world. Be sure to call .think as appropriate. */
Code: Select all
player.customphysics = Util_Null;//Util_Null() is a simple function that does nothing
Code: Select all
player.velocity_z -= 800 * input_timelength;
But, if I include pmove.qc from purecsqc mod and I launch
Code: Select all
PM_Run(player);
No need to mention that I tried, re-tried and tried again to understand why that pmove.qc is so special but, honestly, it's too much complicated for me.
Inside PM_Run, it launches Acceleration, run commands and acceleration again, but I didn't understand why.
Since pmove.qc it's GPL licensed and overcomplicated (at least for me) I'd like to start from basics: make player fall down.
If I change code to
Code: Select all
player.origin_z -= 50 * input_timelength;
Any suggestions, folks?