Stuff I can't remember

This commit is contained in:
Andrei Drexler 2005-09-07 20:29:05 +00:00
parent 9b797f5d56
commit 15bda51d55
7 changed files with 133 additions and 3 deletions

View file

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.160 2005/09/07 20:29:05 makro
// Stuff I can't remember
//
// Revision 1.159 2005/02/15 16:33:38 makro
// Tons of updates (entity tree attachment system, UI vectors)
//
@ -1171,6 +1174,10 @@ typedef struct {
float flareShaderSize[MAX_VISIBLE_FLARES], flareColor[MAX_VISIBLE_FLARES][4];
//Makro - zcam lines
char zcamLine[2][256];
//Makro - head location and axis; used for dead players
vec3_t headPos[3];
vec3_t headAxis[3];
} cg_t;
//Blaze: struct to hold the func_breakable stuff
@ -1732,6 +1739,9 @@ typedef struct {
//Makro - sky portals
vec3_t skyPortalOrigin;
qboolean skyPortalSet;
//how much the portal moves with the player
vec3_t skyPortalMoveFactor;
//Makro - "clear" color
vec3_t clearColor;
qboolean clearColorSet;

View file

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.147 2005/09/07 20:29:05 makro
// Stuff I can't remember
//
// Revision 1.146 2005/02/15 16:33:38 makro
// Tons of updates (entity tree attachment system, UI vectors)
//
@ -2924,6 +2927,8 @@ void CG_Init(int serverMessageNum, int serverCommandSequence, int clientNum)
memset(cg_weapons, 0, sizeof(cg_weapons));
memset(cg_items, 0, sizeof(cg_items));
AxisClear(cg.headAxis);
cg.clientNum = clientNum;
cgs.processedSnapshotNum = serverMessageNum;

View file

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.64 2005/09/07 20:29:05 makro
// Stuff I can't remember
//
// Revision 1.63 2003/09/10 21:40:35 makro
// Cooler breath puffs. Locked r_fastSky on maps with global fog.
// Some other things I can't remember.
@ -1529,7 +1532,7 @@ void CG_WeaponAnimation(centity_t * cent, int *weaponOld, int *weapon, float *we
if (cg_weapons[cent->currentState.weapon].animations[stateAnimNum].firstFrame ==
cent->pe.weapon.animation->firstFrame
&& cg_weapons[cent->currentState.weapon].animations[stateAnimNum].numFrames ==
cent->pe.weapon.animation->numFrames) {
cent->pe.weapon.animation->numFrames) { //Makro - possible bug?
// don't compile my test spam
#if 0
CG_Printf("Animation info okay: (%i versus %i) and (%i versus %i)\n",
@ -2663,6 +2666,12 @@ void CG_Player(centity_t * cent)
VectorCopy(cent->lerpOrigin, head.lightingOrigin);
CG_PositionRotatedEntityOnTag(&head, &torso, ci->torsoModel, "tag_head");
//Makro - save the head pos and orientation if this is the curremt client
if (cent->currentState.number == cg.clientNum)
{
memcpy(cg.headAxis, head.axis, sizeof(head.axis));
memcpy(cg.headPos, head.origin, sizeof(head.origin));
}
head.shadowPlane = shadowPlane;
head.renderfx = renderfx;

View file

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.80 2005/09/07 20:29:05 makro
// Stuff I can't remember
//
// Revision 1.79 2005/02/15 16:33:38 makro
// Tons of updates (entity tree attachment system, UI vectors)
//
@ -463,6 +466,9 @@ void CG_ParseSkyPortal(const char *str)
cgs.skyPortalOrigin[0] = atof(Info_ValueForKey(str, "x"));
cgs.skyPortalOrigin[1] = atof(Info_ValueForKey(str, "y"));
cgs.skyPortalOrigin[2] = atof(Info_ValueForKey(str, "z"));
cgs.skyPortalMoveFactor[0] = atof(Info_ValueForKey(str, "mx"));
cgs.skyPortalMoveFactor[1] = atof(Info_ValueForKey(str, "my"));
cgs.skyPortalMoveFactor[2] = atof(Info_ValueForKey(str, "mz"));
cgs.skyPortalSet = qtrue;
} else {
cgs.skyPortalSet = qfalse;
@ -532,15 +538,21 @@ void CG_ParseMoveParents(const char *str)
Q_strncpyz(tmp, str, 4);
str += 3;
num = atoi(tmp);
//num = GetIntBytes(str, 2) >> 1;
//str += 2;
for (i=0; i<num; i++)
{
int entnum;
Q_strncpyz(tmp, str, 4);
entnum = atoi(tmp);
str += 3;
//entnum = GetIntBytes(str, 2) >> 1;
//str += 2;
Q_strncpyz(tmp, str, 4);
str += 3;
cg_moveParentRanks[entnum] = atoi(tmp);
//cg_moveParentRanks[entnum] = GetIntBytes(str, 2);
//str += 2;
}
}

View file

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.49 2005/09/07 20:29:05 makro
// Stuff I can't remember
//
// Revision 1.48 2005/02/15 16:33:38 makro
// Tons of updates (entity tree attachment system, UI vectors)
//
@ -405,6 +408,44 @@ static void CG_StepOffset(void)
}
}
/*
void CG_PositionRotatedEntityOnTag(refEntity_t * entity, const refEntity_t * parent,
qhandle_t parentModel, char *tagName)
{
int i;
orientation_t lerped;
vec3_t tempAxis[3];
//AxisClear( entity->axis );
// lerp the tag
trap_R_LerpTag(&lerped, parentModel, parent->oldframe, parent->frame, 1.0 - parent->backlerp, tagName);
// FIXME: allow origin offsets along tag?
VectorCopy(parent->origin, entity->origin);
for (i = 0; i < 3; i++) {
VectorMA(entity->origin, lerped.origin[i], parent->axis[i], entity->origin);
}
// had to cast away the const to avoid compiler problems...
MatrixMultiply(entity->axis, lerped.axis, tempAxis);
MatrixMultiply(tempAxis, ((refEntity_t *) parent)->axis, entity->axis);
}
*/
static void CG_DeadPlayerView()
{
if (cg.renderingThirdPerson)
{
cg.refdefViewAngles[ROLL] = 40;
cg.refdefViewAngles[PITCH] = -15;
cg.refdefViewAngles[YAW] = cg.snap->ps.stats[STAT_DEAD_YAW];
cg.refdef.vieworg[2] += cg.predictedPlayerState.viewheight;
} else {
memcpy(cg.refdef.vieworg, cg.headPos, sizeof(cg.headPos));
memcpy(cg.refdef.viewaxis, cg.headAxis, sizeof(cg.headAxis));
cg.refdef.vieworg[2] += 16;
}
}
/*
===============
CG_OffsetFirstPersonView
@ -432,10 +473,13 @@ static void CG_OffsetFirstPersonView(void)
// if dead, fix the angle and don't add any kick
if (cg.snap->ps.stats[STAT_HEALTH] <= 0) {
CG_DeadPlayerView();
/*
angles[ROLL] = 40;
angles[PITCH] = -15;
angles[YAW] = cg.snap->ps.stats[STAT_DEAD_YAW];
origin[2] += cg.predictedPlayerState.viewheight;
*/
return;
}
// add angles based on weapon kick
@ -967,7 +1011,8 @@ static int CG_CalcViewValues(void)
}
// position eye reletive to origin
AnglesToAxis(cg.refdefViewAngles, cg.refdef.viewaxis);
if (cg.snap->ps.stats[STAT_HEALTH] > 0)
AnglesToAxis(cg.refdefViewAngles, cg.refdef.viewaxis);
if (cg.hyperspace) {
cg.refdef.rdflags |= RDF_NOWORLDMODEL | RDF_HYPERSPACE;
@ -1040,6 +1085,7 @@ static void CG_PlayBufferedSounds(void)
#define FLARE_FADEOUT_TIME 200
#define FLARE_BLIND_ALPHA 0.25f
//Makro - lens flare
void CG_AddLensFlare(qboolean sun)
{
vec3_t dir, dp;
@ -1253,10 +1299,16 @@ void CG_DrawActiveFrame(int serverTime, stereoFrame_t stereoView, qboolean demoP
//Makro - draw sky portal first
if (cgs.skyPortalSet) {
vec3_t oldOrigin;
CG_AddPacketEntities(ADDENTS_SKYPORTAL);
skyPortalMode = ADDENTS_NORMAL;
VectorCopy(cg.refdef.vieworg, oldOrigin);
VectorCopy(cgs.skyPortalOrigin, cg.refdef.vieworg);
//Makro - move the portal with the player
cg.refdef.vieworg[0] *= cgs.skyPortalMoveFactor[0];
cg.refdef.vieworg[1] *= cgs.skyPortalMoveFactor[1];
cg.refdef.vieworg[2] *= cgs.skyPortalMoveFactor[2];
VectorAdd(cgs.skyPortalOrigin, cg.refdef.vieworg, cg.refdef.vieworg);
trap_R_RenderScene(&cg.refdef);
VectorCopy(oldOrigin, cg.refdef.vieworg);
}

View file

@ -6,6 +6,48 @@
--------------------Configuration: cgame - Win32 Debug--------------------
</h3>
<h3>Command Lines</h3>
Creating temporary file "C:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP60.tmp" with contents
[
/nologo /G5 /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /FR"Debug/" /Fp"Debug/cgame.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /c
"D:\Work\rq3source\reaction\cgame\cg_view.c"
]
Creating command line "cl.exe @C:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP60.tmp"
Creating temporary file "C:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP61.tmp" with contents
[
/nologo /base:"0x30000000" /subsystem:windows /dll /incremental:yes /pdb:"Debug/cgamex86.pdb" /map:"Debug/cgamex86.map" /debug /machine:I386 /def:".\cgame.def" /out:"D:\Work\rq3source\reaction\Release\cgamex86.dll" /implib:"Debug/cgamex86.lib"
.\Debug\bg_misc.obj
.\Debug\bg_pmove.obj
.\Debug\bg_slidemove.obj
.\Debug\cg_atmospheric.obj
.\Debug\cg_consolecmds.obj
.\Debug\cg_draw.obj
.\Debug\cg_drawtools.obj
.\Debug\cg_effects.obj
.\Debug\cg_ents.obj
.\Debug\cg_event.obj
.\Debug\cg_info.obj
.\Debug\cg_localents.obj
.\Debug\cg_main.obj
.\Debug\cg_marks.obj
.\Debug\cg_players.obj
.\Debug\cg_playerstate.obj
.\Debug\cg_predict.obj
.\Debug\cg_scoreboard.obj
.\Debug\cg_servercmds.obj
.\Debug\cg_snapshot.obj
.\Debug\cg_syscalls.obj
.\Debug\cg_unlagged.obj
.\Debug\cg_view.obj
.\Debug\cg_weapons.obj
.\Debug\q_math.obj
.\Debug\q_shared.obj
.\Debug\ui_shared.obj
]
Creating command line "link.exe @C:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP61.tmp"
<h3>Output Window</h3>
Compiling...
cg_view.c
Linking...

Binary file not shown.