projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update model format
[carveJwlIkooP6JGAAIwe30JlM.git]
/
player.h
diff --git
a/player.h
b/player.h
index b05714e4e893209fe2198628700419d72c600c50..46c7dd4de0d416836bbe1b05d3b358fe80d71216 100644
(file)
--- a/
player.h
+++ b/
player.h
@@
-29,6
+29,7
@@
static float
static int freecam = 0;
static int walk_grid_iterations = 1;
static int freecam = 0;
static int walk_grid_iterations = 1;
+static float fc_speed = 10.0f;
static struct gplayer
{
static struct gplayer
{
@@
-100,13
+101,13
@@
static void player_mouseview(void)
v2_sub( vg_mouse, mouse_last, delta );
v2_copy( vg_mouse, mouse_last );
v2_sub( vg_mouse, mouse_last, delta );
v2_copy( vg_mouse, mouse_last );
- v2_muladds( view_vel, delta, 0.00
5
f, view_vel );
+ v2_muladds( view_vel, delta, 0.00
1
f, view_vel );
}
v2_muladds( view_vel,
(v2f){ vg_get_axis("h1"), vg_get_axis("v1") },
0.05f, view_vel );
}
v2_muladds( view_vel,
(v2f){ vg_get_axis("h1"), vg_get_axis("v1") },
0.05f, view_vel );
- v2_muls( view_vel, 0.
7
f, view_vel );
+ v2_muls( view_vel, 0.
93
f, view_vel );
v2_add( view_vel, player.angles, player.angles );
player.angles[1] = vg_clampf( player.angles[1], -VG_PIf*0.5f, VG_PIf*0.5f );
}
v2_add( view_vel, player.angles, player.angles );
player.angles[1] = vg_clampf( player.angles[1], -VG_PIf*0.5f, VG_PIf*0.5f );
}
@@
-115,7
+116,7
@@
static void player_freecam(void)
{
player_mouseview();
{
player_mouseview();
- float movespeed =
25.0f
;
+ float movespeed =
fc_speed
;
v3f lookdir = { 0.0f, 0.0f, -1.0f },
sidedir = { 1.0f, 0.0f, 0.0f };
v3f lookdir = { 0.0f, 0.0f, -1.0f },
sidedir = { 1.0f, 0.0f, 0.0f };
@@
-162,10
+163,7
@@
static void player_start_air(void)
player.in_air = 1;
float pstep = ktimestep*10.0f;
player.in_air = 1;
float pstep = ktimestep*10.0f;
-
- float best_velocity_mod = 0.0f,
- best_velocity_delta = -9999.9f;
-
+ float best_velocity_delta = -9999.9f;
float k_bias = 0.96f;
v3f axis;
float k_bias = 0.96f;
v3f axis;
@@
-228,7
+226,6
@@
static void player_start_air(void)
if( (land_delta < 0.0f) && (land_delta > best_velocity_delta) )
{
best_velocity_delta = land_delta;
if( (land_delta < 0.0f) && (land_delta > best_velocity_delta) )
{
best_velocity_delta = land_delta;
- best_velocity_mod = vmod;
v3_copy( contact.pos, player.land_target );
v3_copy( contact.pos, player.land_target );
@@
-1016,6
+1013,7
@@
static void player_walkgrid_iter(struct walkgrid *wg, int iter)
pa[0] = wg->region[0][0] + (float)wg->cell_id[0] *k_gridscale;
pa[1] = (wg->region[0][1] + wg->region[1][1]) * 0.5f + k_gridscale;
pa[2] = wg->region[0][2] + (float)wg->cell_id[1] *k_gridscale;
pa[0] = wg->region[0][0] + (float)wg->cell_id[0] *k_gridscale;
pa[1] = (wg->region[0][1] + wg->region[1][1]) * 0.5f + k_gridscale;
pa[2] = wg->region[0][2] + (float)wg->cell_id[1] *k_gridscale;
+#if 0
pb[0] = pa[0];
pb[1] = pa[1];
pb[2] = pa[2] + k_gridscale;
pb[0] = pa[0];
pb[1] = pa[1];
pb[2] = pa[2] + k_gridscale;
@@
-1025,7
+1023,6
@@
static void player_walkgrid_iter(struct walkgrid *wg, int iter)
pd[0] = pa[0] + k_gridscale;
pd[1] = pa[1];
pd[2] = pa[2];
pd[0] = pa[0] + k_gridscale;
pd[1] = pa[1];
pd[2] = pa[2];
-#if 0
/* if you want to draw the current cell */
vg_line( pa, pb, 0xff00ffff );
vg_line( pb, pc, 0xff00ffff );
/* if you want to draw the current cell */
vg_line( pa, pb, 0xff00ffff );
vg_line( pb, pc, 0xff00ffff );
@@
-2005,6
+2002,8
@@
static void player_update(void)
player.mdl.shoes[0] = 1;
player.mdl.shoes[1] = 1;
player.mdl.shoes[0] = 1;
player.mdl.shoes[1] = 1;
+
+ world_routes_notify_reset();
}
if( vg_get_button_down( "switchmode" ) )
}
if( vg_get_button_down( "switchmode" ) )