Dead player view offset tweaks

This commit is contained in:
Andrei Drexler 2005-09-07 22:19:16 +00:00
parent 15bda51d55
commit 7a7a50b2a9
3 changed files with 19 additions and 5 deletions

View file

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.161 2005/09/07 22:19:15 makro
// Dead player view offset tweaks
//
// Revision 1.160 2005/09/07 20:29:05 makro
// Stuff I can't remember
//
@ -1176,8 +1179,9 @@ typedef struct {
char zcamLine[2][256];
//Makro - head location and axis; used for dead players
vec3_t headPos[3];
vec3_t headPos;
vec3_t headAxis[3];
vec3_t oldHeadPos;
} cg_t;
//Blaze: struct to hold the func_breakable stuff

View file

@ -5,6 +5,9 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.50 2005/09/07 22:19:15 makro
// Dead player view offset tweaks
//
// Revision 1.49 2005/09/07 20:29:05 makro
// Stuff I can't remember
//
@ -440,9 +443,16 @@ static void CG_DeadPlayerView()
cg.refdefViewAngles[YAW] = cg.snap->ps.stats[STAT_DEAD_YAW];
cg.refdef.vieworg[2] += cg.predictedPlayerState.viewheight;
} else {
vec3_t dir;
trace_t tr;
memcpy(cg.refdef.vieworg, cg.headPos, sizeof(cg.headPos));
memcpy(cg.refdef.viewaxis, cg.headAxis, sizeof(cg.headAxis));
cg.refdef.vieworg[2] += 16;
VectorSubtract(cg.refdef.vieworg, cg.oldHeadPos, dir);
CG_Trace(&tr, cg.oldHeadPos, NULL, NULL, cg.refdef.vieworg, cg.clientNum, CONTENTS_SOLID);
VectorCopy(tr.endpos, cg.refdef.vieworg);
VectorCopy(cg.refdef.vieworg, cg.oldHeadPos);
}
}

View file

@ -6,13 +6,13 @@
--------------------Configuration: cgame - Win32 Debug--------------------
</h3>
<h3>Command Lines</h3>
Creating temporary file "C:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP60.tmp" with contents
Creating temporary file "C:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP3C.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
Creating command line "cl.exe @C:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP3C.tmp"
Creating temporary file "C:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP3D.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
@ -43,7 +43,7 @@ Creating temporary file "C:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP61.tmp" with conten
.\Debug\q_shared.obj
.\Debug\ui_shared.obj
]
Creating command line "link.exe @C:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP61.tmp"
Creating command line "link.exe @C:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP3D.tmp"
<h3>Output Window</h3>
Compiling...
cg_view.c