mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-11 07:42:15 +00:00
Attempting to intergrate zcam better into rq3 and a fix for lights.wav
This commit is contained in:
parent
2ec2b9a5d2
commit
2d6513af0b
4 changed files with 55 additions and 36 deletions
|
@ -5,6 +5,9 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.36 2002/02/10 16:26:55 jbravo
|
||||||
|
// Attempting to intergrate zcam better into rq3 and a fix for lights.wav
|
||||||
|
//
|
||||||
// Revision 1.35 2002/01/24 14:20:53 jbravo
|
// Revision 1.35 2002/01/24 14:20:53 jbravo
|
||||||
// Adding func_explosive and a few new surfaceparms
|
// Adding func_explosive and a few new surfaceparms
|
||||||
//
|
//
|
||||||
|
@ -2215,7 +2218,9 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) {
|
||||||
// JBravo: LCA soundevents.
|
// JBravo: LCA soundevents.
|
||||||
case RQ3_SOUND_LIGHTS:
|
case RQ3_SOUND_LIGHTS:
|
||||||
if ( es->number == cg.snap->ps.clientNum )
|
if ( es->number == cg.snap->ps.clientNum )
|
||||||
CG_AddBufferedSound(cgs.media.lightsSound);
|
// CG_AddBufferedSound(cgs.media.lightsSound);
|
||||||
|
trap_S_StartSound( NULL, es->number, CHAN_AUTO, cgs.media.lightsSound);
|
||||||
|
// trap_S_StartLocalSound( cgs.media.lightsSound, CHAN_ANNOUNCER );
|
||||||
break;
|
break;
|
||||||
case RQ3_SOUND_CAMERA:
|
case RQ3_SOUND_CAMERA:
|
||||||
if ( es->number == cg.snap->ps.clientNum )
|
if ( es->number == cg.snap->ps.clientNum )
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.36 2002/02/10 16:26:55 jbravo
|
||||||
|
// Attempting to intergrate zcam better into rq3 and a fix for lights.wav
|
||||||
|
//
|
||||||
// Revision 1.35 2002/02/07 23:01:07 slicer
|
// Revision 1.35 2002/02/07 23:01:07 slicer
|
||||||
// Small fix..
|
// Small fix..
|
||||||
//
|
//
|
||||||
|
@ -1180,6 +1183,10 @@ void ClientBegin( int clientNum ) {
|
||||||
// JBravo: if teamplay and the client has not been on teams, make them a spectator.
|
// JBravo: if teamplay and the client has not been on teams, make them a spectator.
|
||||||
if ( g_gametype.integer == GT_TEAMPLAY && client->sess.savedTeam != TEAM_RED && client->sess.savedTeam != TEAM_BLUE ) {
|
if ( g_gametype.integer == GT_TEAMPLAY && client->sess.savedTeam != TEAM_RED && client->sess.savedTeam != TEAM_BLUE ) {
|
||||||
client->sess.sessionTeam = TEAM_SPECTATOR;
|
client->sess.sessionTeam = TEAM_SPECTATOR;
|
||||||
|
client->sess.spectatorState = SPECTATOR_FREE;
|
||||||
|
#ifdef __ZCAM__
|
||||||
|
client->camera->mode = CAMERA_MODE_FLIC;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( client->sess.sessionTeam != TEAM_SPECTATOR ) {
|
if ( client->sess.sessionTeam != TEAM_SPECTATOR ) {
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.5 2002/02/10 16:26:55 jbravo
|
||||||
|
// Attempting to intergrate zcam better into rq3 and a fix for lights.wav
|
||||||
|
//
|
||||||
// Revision 1.4 2002/02/09 01:06:36 jbravo
|
// Revision 1.4 2002/02/09 01:06:36 jbravo
|
||||||
// Added zcam files
|
// Added zcam files
|
||||||
//
|
//
|
||||||
|
@ -50,41 +53,6 @@ gentity_t *PlayerToTrack (gentity_t *ent, gentity_t *target1st);
|
||||||
#define SWING_FOV_FACTOR 1.25F
|
#define SWING_FOV_FACTOR 1.25F
|
||||||
#define SWING_MSG_TIME 1000
|
#define SWING_MSG_TIME 1000
|
||||||
|
|
||||||
/* camera mode */
|
|
||||||
typedef enum camera_mode_e {
|
|
||||||
CAMERA_MODE_FLIC,
|
|
||||||
CAMERA_MODE_SWING
|
|
||||||
} camera_mode_t;
|
|
||||||
|
|
||||||
/* camera data */
|
|
||||||
typedef struct camera_s
|
|
||||||
{
|
|
||||||
camera_mode_t mode; // camera mode
|
|
||||||
|
|
||||||
// swing mode
|
|
||||||
float swing_distance; // distance behind player
|
|
||||||
float swing_height; // height of camera
|
|
||||||
float swing_angle; // angle of camera
|
|
||||||
float swing_yaw; // yaw of camera
|
|
||||||
float swing_pitch; // pitch of camera
|
|
||||||
gentity_t *swing_target;
|
|
||||||
gentity_t *swing_secondry_target;
|
|
||||||
vec3_t swing_last_viewangles;
|
|
||||||
float swing_msg_time;
|
|
||||||
|
|
||||||
// flic mode
|
|
||||||
gentity_t *flic_target;
|
|
||||||
qboolean flic_watching_the_dead;
|
|
||||||
qboolean flic_watching_the_wall;
|
|
||||||
vec3_t flic_dead_origin;
|
|
||||||
float flic_xy_lag;
|
|
||||||
float flic_z_lag;
|
|
||||||
float flic_angle_lag;
|
|
||||||
float flic_last_move_time;
|
|
||||||
float flic_last_switch_time;
|
|
||||||
qboolean flic_override; // signal that player must be followed
|
|
||||||
} camera_t;
|
|
||||||
|
|
||||||
#ifndef min
|
#ifndef min
|
||||||
#define min(a, b) ((a) < (b) ? (a) : (b))
|
#define min(a, b) ((a) < (b) ? (a) : (b))
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.5 2002/02/10 16:26:55 jbravo
|
||||||
|
// Attempting to intergrate zcam better into rq3 and a fix for lights.wav
|
||||||
|
//
|
||||||
// Revision 1.4 2002/02/09 01:07:14 jbravo
|
// Revision 1.4 2002/02/09 01:07:14 jbravo
|
||||||
// Added zcam files
|
// Added zcam files
|
||||||
//
|
//
|
||||||
|
@ -38,5 +41,41 @@ void camera_disconnect (gentity_t *ent);
|
||||||
void camera_think (gentity_t *ent);
|
void camera_think (gentity_t *ent);
|
||||||
void camera_cmd (gentity_t *ent);
|
void camera_cmd (gentity_t *ent);
|
||||||
|
|
||||||
|
// JBravo: moved from zcam.c to here:
|
||||||
|
/* camera mode */
|
||||||
|
typedef enum camera_mode_e {
|
||||||
|
CAMERA_MODE_FLIC,
|
||||||
|
CAMERA_MODE_SWING
|
||||||
|
} camera_mode_t;
|
||||||
|
|
||||||
|
/* camera data */
|
||||||
|
typedef struct camera_s
|
||||||
|
{
|
||||||
|
camera_mode_t mode; // camera mode
|
||||||
|
|
||||||
|
// swing mode
|
||||||
|
float swing_distance; // distance behind player
|
||||||
|
float swing_height; // height of camera
|
||||||
|
float swing_angle; // angle of camera
|
||||||
|
float swing_yaw; // yaw of camera
|
||||||
|
float swing_pitch; // pitch of camera
|
||||||
|
gentity_t *swing_target;
|
||||||
|
gentity_t *swing_secondry_target;
|
||||||
|
vec3_t swing_last_viewangles;
|
||||||
|
float swing_msg_time;
|
||||||
|
|
||||||
|
// flic mode
|
||||||
|
gentity_t *flic_target;
|
||||||
|
qboolean flic_watching_the_dead;
|
||||||
|
qboolean flic_watching_the_wall;
|
||||||
|
vec3_t flic_dead_origin;
|
||||||
|
float flic_xy_lag;
|
||||||
|
float flic_z_lag;
|
||||||
|
float flic_angle_lag;
|
||||||
|
float flic_last_move_time;
|
||||||
|
float flic_last_switch_time;
|
||||||
|
qboolean flic_override; // signal that player must be followed
|
||||||
|
} camera_t;
|
||||||
|
|
||||||
#endif /* __ZCAM_H__ */
|
#endif /* __ZCAM_H__ */
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue