r5715 - in trunk/data: . qcsrc/client
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sun Feb 1 11:38:54 EST 2009
Author: mand1nga
Date: 2009-02-01 11:38:53 -0500 (Sun, 01 Feb 2009)
New Revision: 5715
Modified:
trunk/data/defaultNexuiz.cfg
trunk/data/qcsrc/client/Main.qc
trunk/data/qcsrc/client/View.qc
trunk/data/qcsrc/client/main.qh
Log:
Turned aliases for rotating the camera into commands: +roll_left/right
Modified: trunk/data/defaultNexuiz.cfg
===================================================================
--- trunk/data/defaultNexuiz.cfg 2009-02-01 15:10:24 UTC (rev 5714)
+++ trunk/data/defaultNexuiz.cfg 2009-02-01 16:38:53 UTC (rev 5715)
@@ -1388,7 +1388,7 @@
sv_status_show_qcstatus 1 // Nexuiz uses this field instead of frags
set g_full_getstatus_responses 0 "this currently breaks qstat"
-// Defaults and aliases for the demo camera
+// Demo camera
set camera_enable 0 "Enables the camera for demo playback"
set camera_free 0 "Free camera instead of chasing the player"
set camera_reset 0 "Resets the camera position and switch to chase mode"
@@ -1402,11 +1402,6 @@
set camera_look_attenuation 8 "Attenuation of \"looking\" movements, only if camera_look_player is set. Bigger is smoother."
set camera_forward_follows 1 "0: Move the camera forwards without changing altitude. 1: Move towards what you are looking."
-alias +camera_roll_right "set camera_roll 1"
-alias -camera_roll_right "set camera_roll 0"
-alias +camera_roll_left "set camera_roll -1"
-alias -camera_roll_left -camera_roll_right
-
// "Gentle mode": show no blood
seta sv_gentle 0 "force gentle mode for everyone, also remove references to acts of killing from the messages"
seta cl_gentle 0 "client side gentle mode (only replaces gibs)"
Modified: trunk/data/qcsrc/client/Main.qc
===================================================================
--- trunk/data/qcsrc/client/Main.qc 2009-02-01 15:10:24 UTC (rev 5714)
+++ trunk/data/qcsrc/client/Main.qc 2009-02-01 16:38:53 UTC (rev 5715)
@@ -93,6 +93,8 @@
registercmd("+movedown");registercmd("-movedown");
registercmd("+moveright");registercmd("-moveright");
registercmd("+moveleft");registercmd("-moveleft");
+ registercmd("+roll_right");registercmd("-roll_right");
+ registercmd("+roll_left");registercmd("-roll_left");
#ifndef CAMERATEST
}
#endif
@@ -342,6 +344,12 @@
} else if(strCmd == "-moveup" || strCmd == "+movedown") {
--camera_direction_z;
return true;
+ } else if(strCmd == "+roll_right" || strCmd == "-roll_left") {
+ ++camera_roll;
+ return true;
+ } else if(strCmd == "+roll_left" || strCmd == "-roll_right") {
+ --camera_roll;
+ return true;
}
return false;
Modified: trunk/data/qcsrc/client/View.qc
===================================================================
--- trunk/data/qcsrc/client/View.qc 2009-02-01 15:10:24 UTC (rev 5714)
+++ trunk/data/qcsrc/client/View.qc 2009-02-01 16:38:53 UTC (rev 5715)
@@ -560,8 +560,8 @@
}
// Camera angles
- if( cvar("camera_roll") )
- mouse_angles_z += cvar("camera_roll") * cvar("camera_speed_roll");
+ if( camera_roll )
+ mouse_angles_z += camera_roll * cvar("camera_speed_roll");
if(cvar("camera_look_player"))
{
@@ -589,13 +589,12 @@
while (mouse_angles_y < -180) mouse_angles_y = mouse_angles_y + 360;
while (mouse_angles_y > 180) mouse_angles_y = mouse_angles_y - 360;
- // Wrap angles for quick movements
+ // Fix difference when angles don't have the same sign
delta = '0 0 0';
if(mouse_angles_y < -60 && current_angles_y > 60)
delta = '0 360 0';
if(mouse_angles_y > 60 && current_angles_y < -60)
delta = '0 -360 0';
- //
if(cvar("camera_look_player"))
attenuation = cvar("camera_look_attenuation");
Modified: trunk/data/qcsrc/client/main.qh
===================================================================
--- trunk/data/qcsrc/client/main.qh 2009-02-01 15:10:24 UTC (rev 5714)
+++ trunk/data/qcsrc/client/main.qh 2009-02-01 16:38:53 UTC (rev 5715)
@@ -141,4 +141,5 @@
float camera_active; // Demo camera is active if set to TRUE
float chase_active_backup;
+float camera_roll;
vector camera_direction;
\ No newline at end of file
More information about the nexuiz-commits
mailing list