projects
/
carveJwlIkooP6JGAAIwe30JlM.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
achievements and stuff
[carveJwlIkooP6JGAAIwe30JlM.git]
/
player.h
diff --git
a/player.h
b/player.h
index 57a862817038bb5bf798118617d42a3ed45d2589..0d773389945602aea7344500dfb410c8317024a0 100644
(file)
--- a/
player.h
+++ b/
player.h
@@
-17,7
+17,8
@@
static float
k_board_radius = 0.3f,
k_board_length = 0.45f,
k_board_allowance = 0.04f,
k_board_radius = 0.3f,
k_board_length = 0.45f,
k_board_allowance = 0.04f,
- k_friction_lat = 8.8f,
+ //k_friction_lat = 8.8f,
+ k_friction_lat = 12.0f,
k_friction_resistance = 0.01f,
k_max_push_speed = 16.0f,
k_push_accel = 10.0f,
k_friction_resistance = 0.01f,
k_max_push_speed = 16.0f,
k_push_accel = 10.0f,
@@
-70,7
+71,10
@@
static struct gplayer
phys,
phys_gate_frame;
phys,
phys_gate_frame;
- int is_dead;
+ m4x3f visual_transform,
+ inv_visual_transform;
+
+ int is_dead, death_tick_allowance;
v3f land_target;
v3f land_target_log[22];
v3f land_target;
v3f land_target_log[22];
@@
-98,8
+102,10
@@
static struct gplayer
fsetup,
walk_timer,
fjump,
fsetup,
walk_timer,
fjump,
- fonboard;
+ fonboard,
+ frun;
+ float walk;
int step_phase;
/* player model */
int step_phase;
/* player model */
@@
-237,6
+243,7
@@
static void player_update_pre(void)
if( vg_get_button_down( "reset" ) )
{
player.is_dead = 0;
if( vg_get_button_down( "reset" ) )
{
player.is_dead = 0;
+ player.death_tick_allowance = 30;
player_restore_frame();
if( !phys->on_board )
player_restore_frame();
if( !phys->on_board )
@@
-264,6
+271,9
@@
static void player_update_pre(void)
static void player_update_fixed(void) /* 2 */
{
static void player_update_fixed(void) /* 2 */
{
+ if( player.death_tick_allowance )
+ player.death_tick_allowance --;
+
struct player_phys *phys = &player.phys;
if( player.is_dead )
struct player_phys *phys = &player.phys;
if( player.is_dead )
@@
-341,8
+351,11
@@
static float *player_get_pos(void)
static void player_kill(void)
{
static void player_kill(void)
{
- player.is_dead = 1;
- player_ragdoll_copy_model( player.phys.rb.v );
+ if( player.death_tick_allowance == 0 )
+ {
+ player.is_dead = 1;
+ player_ragdoll_copy_model( player.phys.rb.v );
+ }
}
static float *player_cam_pos(void)
}
static float *player_cam_pos(void)