I got this idea from Tricobs thread for creating more Doom-like movement...
First use this gun bobbing-routine by BrotherTank as a base (if you haven't
installed gun bobbing yet)...
Now in wl_agent.c go to Thrust() and change the values to these:
Now open up wl_draw.c and search for SimpleScaleShape... Change it to this form:
Now add '0' as spcs value in every single reference to SimpleScaleShape except
in the one found in DrawPlayerWeapon(). After you have done this - go to the
DrawPlayerWeapon() look for a line looking like this:
Then we have to go to the SimpleScaleShape() and edit it a bit to make this code work...
Search for this line in SimpleScaleShape():
And replace it with this:
Now when you recompile your source - instead of weapon scaling
smaller / larger while moving - it actually "bobs" up and down.
NOTE: This code should work with the original DOS-side of code aswell...
First use this gun bobbing-routine by BrotherTank as a base (if you haven't
installed gun bobbing yet)...
Now in wl_agent.c go to Thrust() and change the values to these:
- Code:
if (gamestate.bobdir != 1) gamestate.bobber++; else gamestate.bobber--;
if (gamestate.bobber == 20 || gamestate.bobber == 0) gamestate.bobdir ^= 1;
if (gamestate.bobdir2 != 1) gamestate.bobber2++; else gamestate.bobber2--;
if (gamestate.bobber2 == 40 || gamestate.bobber2 == 0) gamestate.bobdir2 ^= 1;
Now open up wl_draw.c and search for SimpleScaleShape... Change it to this form:
- Code:
void SimpleScaleShape (int xcenter, int shapenum, unsigned height,int spc);
Now add '0' as spcs value in every single reference to SimpleScaleShape except
in the one found in DrawPlayerWeapon(). After you have done this - go to the
DrawPlayerWeapon() look for a line looking like this:
- Code:
SimpleScaleShape((viewwidth/2)-10+gamestate.bobber2,shapenum,viewheight+1+gamestate.bobber);
- Code:
SimpleScaleShape((viewwidth/2)-10+gamestate.bobber2,shapenum,viewheight+1,1);
// SimpleScaleShape((viewwidth/2)-10+gamestate.bobber2,shapenum,viewheight+1+(gamestate.bobber*2),0);
Then we have to go to the SimpleScaleShape() and edit it a bit to make this code work...
Search for this line in SimpleScaleShape():
- Code:
upperedge=viewheight/2-scale;
And replace it with this:
- Code:
if(spc==1)
upperedge=viewheight/2-scale+(gamestate.bobber*2);
else
upperedge=viewheight/2-scale;
Now when you recompile your source - instead of weapon scaling
smaller / larger while moving - it actually "bobs" up and down.
NOTE: This code should work with the original DOS-side of code aswell...