before the storm
authorhgn <hgodden00@gmail.com>
Tue, 4 Oct 2022 02:08:23 +0000 (03:08 +0100)
committerhgn <hgodden00@gmail.com>
Tue, 4 Oct 2022 02:08:23 +0000 (03:08 +0100)
main.c
models_src/mp_dev.mdl
player.h
player_model.h
server.c
textures_src/graffitibox.png

diff --git a/main.c b/main.c
index c90a945622d62b46eb38cdaeaf22886999008343..1b106250da54ba3e0359a97bcc2ec158ef0fdd63 100644 (file)
--- 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"
index 22145932b9dc48487977bf61a60bafec15cc5206..d6d132e178269cfd38a7e2fa327732de83bc66ba 100644 (file)
Binary files a/models_src/mp_dev.mdl and b/models_src/mp_dev.mdl differ
index 0e9be562e97b99ff8a5ec30ae3bbab32ad118b60..6fb74dcf6427c5c6ce6a709399f77edb9a9dadec 100644 (file)
--- 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 );
 }
index a4a626c666cfe7db46d171d571d4251d66efccca..1673581a98aedb719d7c9dcc455328281d9202bb 100644 (file)
@@ -1,3 +1,7 @@
+/*
+ * Copyright 2021-2022 (C) Mount0 Software, Harry Godden - All Rights Reserved
+ */
+
 #ifndef CHARACTER_H 
 #define CHARACTER_H
 
index f8639965a2214e7e8495073ac3bd9760f4943c27..4f3ceb6b27dd7023c9473414a1d0019197741109 100644 (file)
--- 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 
index 064d17eb5067b49fff42e12902e6a8952ec9171b..21c757346b00f870da5a49723de39eef9e9d8cf0 100644 (file)
Binary files a/textures_src/graffitibox.png and b/textures_src/graffitibox.png differ