From: hgn Date: Tue, 4 Oct 2022 02:08:23 +0000 (+0100) Subject: before the storm X-Git-Url: https://harrygodden.com/git/?a=commitdiff_plain;ds=sidebyside;h=4744d53642cca117c2e130d39cc58b2911336bf3;p=carveJwlIkooP6JGAAIwe30JlM.git before the storm --- diff --git a/main.c b/main.c index c90a945..1b10625 100644 --- a/main.c +++ b/main.c @@ -1,5 +1,9 @@ /* - * Copyright (C) Mount0 Software, Harry Godden - All Rights Reserved + * Copyright 2021-2022 (C) Mount0 Software, Harry Godden - All Rights Reserved + * + * module.h structure definitions + * module_submodule.h implementation + * module_submodule_2.h */ #include "common.h" diff --git a/models_src/mp_dev.mdl b/models_src/mp_dev.mdl index 2214593..d6d132e 100644 Binary files a/models_src/mp_dev.mdl and b/models_src/mp_dev.mdl differ diff --git a/player.h b/player.h index 0e9be56..6fb74dc 100644 --- a/player.h +++ b/player.h @@ -1,3 +1,7 @@ +/* + * Copyright 2021-2022 (C) Mount0 Software, Harry Godden - All Rights Reserved + */ + #ifndef PLAYER_H #define PLAYER_H @@ -94,7 +98,7 @@ static struct gplayer walk_timer, fonboard; - v3f last_step_pos; +v3f last_step_pos; int step_phase; } player = @@ -828,9 +832,8 @@ static void player_do_motion(void) m3x3_mulv( gate->transport, fwd_dir, fwd_dir ); player.angles[0] = atan2f( fwd_dir[2], fwd_dir[0] ); - } - + m3x3_copy( player.vr, player.gate_vr_frame ); m3x3_copy( player.vr_pstep, player.gate_vr_pstep_frame ); @@ -933,7 +936,6 @@ static void player_animate(void) offset[0] = vg_clampf( offset[0], -0.8f, 0.8f ); offset[1] = vg_clampf( offset[1], -0.5f, 0.0f ); - offset[1] = 0.0f; /* * Animation blending @@ -1033,7 +1035,7 @@ static void player_animate(void) skeleton_lerp_pose( sk, ground_pose, air_pose, player.ffly, apose ); - float add_grab_mod = player.ffly * player.grab; + float add_grab_mod = 1.0f - player.ffly*player.grab; /* additive effects */ apose[player.mdl.id_hip-1].co[0] += offset[0]*add_grab_mod; @@ -1062,9 +1064,13 @@ static void player_animate(void) static void player_camera_update(void) { /* Update camera matrices */ - m4x3_identity( player.camera ); - m4x3_rotate_y( player.camera, -player.angles[0] ); - m4x3_rotate_x( player.camera, -player.angles[1] ); + v4f qyaw, qpitch, qcam; + q_axis_angle( qyaw, (v3f){ 0.0f, 1.0f, 0.0f }, -player.angles[0] ); + q_axis_angle( qpitch, (v3f){ 1.0f, 0.0f, 0.0f }, -player.angles[1] ); + + q_mul( qyaw, qpitch, qcam ); + q_m3x3( qcam, player.camera ); + v3_copy( player.camera_pos, player.camera[3] ); m4x3_invert_affine( player.camera, player.camera_inverse ); } diff --git a/player_model.h b/player_model.h index a4a626c..1673581 100644 --- a/player_model.h +++ b/player_model.h @@ -1,3 +1,7 @@ +/* + * Copyright 2021-2022 (C) Mount0 Software, Harry Godden - All Rights Reserved + */ + #ifndef CHARACTER_H #define CHARACTER_H diff --git a/server.c b/server.c index f863996..4f3ceb6 100644 --- a/server.c +++ b/server.c @@ -1,4 +1,4 @@ -// Copyright (C) 2021 Harry Godden (hgn) - All Rights Reserved +/* Copyright (C) 2021-2022 Harry Godden (hgn) - All Rights Reserved */ /* * This server application requires steamclient.so to be present in the diff --git a/textures_src/graffitibox.png b/textures_src/graffitibox.png index 064d17e..21c7573 100644 Binary files a/textures_src/graffitibox.png and b/textures_src/graffitibox.png differ