mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2025-04-14 14:11:20 +00:00
no message
This commit is contained in:
parent
39da50151f
commit
004e8b9445
11 changed files with 283 additions and 167 deletions
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.44 2003/08/10 20:13:26 makro
|
||||
// no message
|
||||
//
|
||||
// Revision 1.43 2003/04/19 15:27:30 jbravo
|
||||
// Backing out of most of unlagged. Only optimized prediction and smooth clients
|
||||
// remains.
|
||||
|
@ -1081,7 +1084,7 @@ void CG_AddPacketEntities(int mode)
|
|||
centity_t *cent;
|
||||
int num;
|
||||
|
||||
//Makro - if we're rendering the entities in a sky portals, we don't need this stuff
|
||||
//Makro - if we're rendering the entities in a sky portal, we don't need this stuff
|
||||
if (mode != 1) {
|
||||
playerState_t *ps;
|
||||
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.149 2003/08/10 20:13:26 makro
|
||||
// no message
|
||||
//
|
||||
// Revision 1.148 2003/07/30 16:05:46 makro
|
||||
// no message
|
||||
//
|
||||
|
@ -358,6 +361,7 @@
|
|||
#include "tr_types.h"
|
||||
#include "../game/bg_public.h"
|
||||
#include "cg_public.h"
|
||||
#include "..\GAME\q_shared.h" // Added by ClassView
|
||||
|
||||
// The entire cgame module is unloaded and reloaded on each level change,
|
||||
// so there is NO persistant data between levels on the client side.
|
||||
|
@ -1674,6 +1678,12 @@ typedef struct {
|
|||
cgMedia_t media;
|
||||
// JBravo: unlagged
|
||||
int delagHitscan;
|
||||
//Makro - sky portals
|
||||
vec3_t skyPortalOrigin;
|
||||
qboolean skyPortalSet;
|
||||
//Makro - "clear" color
|
||||
vec3_t clearColor;
|
||||
qboolean clearColorSet;
|
||||
} cgs_t;
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.138 2003/08/10 20:13:26 makro
|
||||
// no message
|
||||
//
|
||||
// Revision 1.137 2003/07/30 16:05:46 makro
|
||||
// no message
|
||||
//
|
||||
|
@ -1852,8 +1855,10 @@ static void CG_RegisterBreakables(void)
|
|||
continue;
|
||||
}
|
||||
|
||||
id = atoi(Info_ValueForKey(breakInfo, "id"));
|
||||
if (id >= 0 && id < RQ3_MAX_BREAKABLES) {
|
||||
//Makro - not needed
|
||||
//id = atoi(Info_ValueForKey(breakInfo, "id"));
|
||||
id = i;
|
||||
//if (id >= 0 && id < RQ3_MAX_BREAKABLES) {
|
||||
name = Info_ValueForKey(breakInfo, "type");
|
||||
Com_Printf("Registering breakable %s ID=%d\n", name, id);
|
||||
//Blaze: Breakable stuff - register the models, sounds, and explosion shader
|
||||
|
@ -1907,9 +1912,9 @@ static void CG_RegisterBreakables(void)
|
|||
cgs.media.breakables[id].shader = trap_R_RegisterShader(va("breakable_%s_explosion", name));
|
||||
cgs.media.breakables[id].velocity = atoi(Info_ValueForKey(breakInfo, "velocity"));
|
||||
cgs.media.breakables[id].jump = atoi(Info_ValueForKey(breakInfo, "jump"));
|
||||
} else {
|
||||
CG_Printf("ID was %d\n", id);
|
||||
}
|
||||
//} else {
|
||||
// CG_Printf("ID was %d\n", id);
|
||||
//}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.73 2003/08/10 20:13:26 makro
|
||||
// no message
|
||||
//
|
||||
// Revision 1.72 2003/04/19 17:41:26 jbravo
|
||||
// Applied changes that where in 1.29h -> 1.32b gamecode.
|
||||
//
|
||||
|
@ -433,6 +436,31 @@ static void CG_ParseWarmup(void)
|
|||
cg.warmup = warmup;
|
||||
}
|
||||
|
||||
//Makro - added
|
||||
void CG_ParseSkyPortal(const char *str)
|
||||
{
|
||||
if (str && str[0] && Q_stricmp(str, "none")) {
|
||||
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.skyPortalSet = qtrue;
|
||||
} else {
|
||||
cgs.skyPortalSet = qfalse;
|
||||
}
|
||||
}
|
||||
|
||||
//Makro - added
|
||||
void CG_ParseFogHull(const char *str)
|
||||
{
|
||||
if (str && str[0]) {
|
||||
cgs.clearColor[0] = atof(Info_ValueForKey(str, "r"));
|
||||
cgs.clearColor[1] = atof(Info_ValueForKey(str, "g"));
|
||||
cgs.clearColor[2] = atof(Info_ValueForKey(str, "b"));
|
||||
cgs.clearColorSet = qtrue;
|
||||
} else {
|
||||
cgs.clearColorSet = qfalse;
|
||||
}
|
||||
}
|
||||
/*
|
||||
================
|
||||
CG_SetConfigValues
|
||||
|
@ -456,6 +484,10 @@ void CG_SetConfigValues(void)
|
|||
// q3f atmospheric stuff:
|
||||
if ( cg_atmosphericEffects.integer )
|
||||
CG_EffectParse( CG_ConfigString( CS_ATMOSEFFECT ) );
|
||||
//Makro - "clear" color
|
||||
CG_ParseFogHull( CG_ConfigString(CS_FOGHULL) );
|
||||
//Makro - sky portal
|
||||
CG_ParseSkyPortal( CG_ConfigString(CS_SKYPORTAL) );
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -575,7 +607,13 @@ static void CG_ConfigStringModified(void)
|
|||
CG_ShaderStateChanged();
|
||||
} else if( num == CS_ATMOSEFFECT ) {
|
||||
CG_EffectParse( str );
|
||||
}
|
||||
//Makro - sky portals
|
||||
} else if (num == CS_SKYPORTAL) {
|
||||
CG_ParseSkyPortal(str);
|
||||
//Makro - "clear" color
|
||||
} else if (num == CS_FOGHULL) {
|
||||
CG_ParseFogHull(str);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.35 2003/08/10 20:13:26 makro
|
||||
// no message
|
||||
//
|
||||
// Revision 1.34 2003/04/23 17:49:38 slicer
|
||||
// Added new cvar cg_RQ3_ssgZoomSensLock
|
||||
//
|
||||
|
@ -1004,8 +1007,6 @@ Generates and draws a game scene and status information at the given time.
|
|||
void CG_DrawActiveFrame(int serverTime, stereoFrame_t stereoView, qboolean demoPlayback)
|
||||
{
|
||||
int inwater;
|
||||
//Makro - added for sky portals
|
||||
const char *info;
|
||||
int skyPortalMode = -1;
|
||||
|
||||
//Blaze: for cheat detection
|
||||
|
@ -1068,36 +1069,24 @@ void CG_DrawActiveFrame(int serverTime, stereoFrame_t stereoView, qboolean demoP
|
|||
memcpy(cg.refdef.areamask, cg.snap->areamask, sizeof(cg.refdef.areamask));
|
||||
|
||||
//Makro - fog hull
|
||||
info = CG_ConfigString(CS_FOGHULL);
|
||||
if (info) {
|
||||
if (info[0]) {
|
||||
vec4_t fogcolor;
|
||||
fogcolor[0] = atof(Info_ValueForKey(info, "r"));
|
||||
fogcolor[1] = atof(Info_ValueForKey(info, "g"));
|
||||
fogcolor[2] = atof(Info_ValueForKey(info, "b"));
|
||||
fogcolor[3] = 1;
|
||||
CG_FillRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, fogcolor);
|
||||
//Com_Printf("Fog color: %f %f %f\n", fogcolor[0], fogcolor[1], fogcolor[2]);
|
||||
}
|
||||
if (cgs.clearColorSet) {
|
||||
float fogcolor[4];
|
||||
fogcolor[0] = cgs.clearColor[0];
|
||||
fogcolor[1] = cgs.clearColor[1];
|
||||
fogcolor[2] = cgs.clearColor[2];
|
||||
fogcolor[3] = 1.0f;
|
||||
CG_FillRect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, fogcolor);
|
||||
}
|
||||
//CG_DrawBigPolygon();
|
||||
|
||||
//Makro - draw sky portal first
|
||||
//Note - doing it here means that sky portal entities won't get drawn. but at least the rest of the map looks ok :/
|
||||
info = CG_ConfigString(CS_SKYPORTAL);
|
||||
if (info[0] && Q_stricmp(info, "none")) {
|
||||
if (cgs.skyPortalSet) {
|
||||
vec3_t oldOrigin;
|
||||
|
||||
skyPortalMode = 0;
|
||||
CG_AddPacketEntities(qtrue);
|
||||
CG_AddPacketEntities(1);
|
||||
VectorCopy(cg.refdef.vieworg, oldOrigin);
|
||||
cg.refdef.vieworg[0] = atof(Info_ValueForKey(info, "x"));
|
||||
cg.refdef.vieworg[1] = atof(Info_ValueForKey(info, "y"));
|
||||
cg.refdef.vieworg[2] = atof(Info_ValueForKey(info, "z"));
|
||||
//memset(skyRef.areamask, 0, sizeof(skyRef.areamask));
|
||||
//Com_Printf("View axis is: %f %f %f\n", cg.refdef.viewaxis[0], cg.refdef.viewaxis[1], cg.refdef.viewaxis[2]);
|
||||
VectorCopy(cgs.skyPortalOrigin, cg.refdef.vieworg);
|
||||
trap_R_RenderScene(&cg.refdef);
|
||||
//trap_R_ClearScene();
|
||||
VectorCopy(oldOrigin, cg.refdef.vieworg);
|
||||
}
|
||||
|
||||
|
|
|
@ -6,29 +6,54 @@
|
|||
--------------------Configuration: cgame - Win32 Release--------------------
|
||||
</h3>
|
||||
<h3>Command Lines</h3>
|
||||
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP73D.tmp" with contents
|
||||
[
|
||||
/nologo /G6 /ML /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Fp"Release/cgame.pch" /YX /Fo"Release/" /Fd"Release/" /FD /c
|
||||
"C:\Games\Quake3\rq3source\reaction\cgame\cg_servercmds.c"
|
||||
]
|
||||
Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP73D.tmp"
|
||||
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP73E.tmp" with contents
|
||||
[
|
||||
/nologo /base:"0x30000000" /subsystem:windows /dll /incremental:no /pdb:"Release/cgamex86.pdb" /map:"Release/cgamex86.map" /machine:I386 /def:".\cgame.def" /out:"../Release/cgamex86.dll" /implib:"Release/cgamex86.lib"
|
||||
.\Release\bg_misc.obj
|
||||
.\Release\bg_pmove.obj
|
||||
.\Release\bg_slidemove.obj
|
||||
.\Release\cg_atmospheric.obj
|
||||
.\Release\cg_consolecmds.obj
|
||||
.\Release\cg_draw.obj
|
||||
.\Release\cg_drawtools.obj
|
||||
.\Release\cg_effects.obj
|
||||
.\Release\cg_ents.obj
|
||||
.\Release\cg_event.obj
|
||||
.\Release\cg_info.obj
|
||||
.\Release\cg_localents.obj
|
||||
.\Release\cg_main.obj
|
||||
.\Release\cg_marks.obj
|
||||
.\Release\cg_players.obj
|
||||
.\Release\cg_playerstate.obj
|
||||
.\Release\cg_predict.obj
|
||||
.\Release\cg_scoreboard.obj
|
||||
.\Release\cg_servercmds.obj
|
||||
.\Release\cg_snapshot.obj
|
||||
.\Release\cg_syscalls.obj
|
||||
.\Release\cg_unlagged.obj
|
||||
.\Release\cg_view.obj
|
||||
.\Release\cg_weapons.obj
|
||||
.\Release\q_math.obj
|
||||
.\Release\q_shared.obj
|
||||
.\Release\ui_shared.obj
|
||||
]
|
||||
Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP73E.tmp"
|
||||
<h3>Output Window</h3>
|
||||
Compiling...
|
||||
cg_servercmds.c
|
||||
Linking...
|
||||
Creating library Release/cgamex86.lib and object Release/cgamex86.exp
|
||||
|
||||
|
||||
|
||||
<h3>Results</h3>
|
||||
cgamex86.dll - 0 error(s), 0 warning(s)
|
||||
<h3>
|
||||
--------------------Configuration: game - Win32 Release--------------------
|
||||
</h3>
|
||||
<h3>Command Lines</h3>
|
||||
|
||||
|
||||
|
||||
<h3>Results</h3>
|
||||
qagamex86.dll - 0 error(s), 0 warning(s)
|
||||
<h3>
|
||||
--------------------Configuration: ui - Win32 Release TA--------------------
|
||||
</h3>
|
||||
<h3>Command Lines</h3>
|
||||
|
||||
|
||||
|
||||
<h3>Results</h3>
|
||||
uix86.dll - 0 error(s), 0 warning(s)
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.143 2003/08/10 20:13:26 makro
|
||||
// no message
|
||||
//
|
||||
// Revision 1.142 2003/07/30 16:05:46 makro
|
||||
// no message
|
||||
//
|
||||
|
@ -548,6 +551,7 @@ struct gentity_s {
|
|||
//Makro - added
|
||||
char *activatename;
|
||||
int inactive;
|
||||
vec3_t backup_origin;
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.73 2003/08/10 20:13:26 makro
|
||||
// no message
|
||||
//
|
||||
// Revision 1.72 2003/07/30 16:05:46 makro
|
||||
// no message
|
||||
//
|
||||
|
@ -769,7 +772,7 @@ void Use_Breakable(gentity_t * self, gentity_t * other, gentity_t * activator)
|
|||
//{
|
||||
//make sure it breaks
|
||||
//Makro - added check
|
||||
if (!self->exploded)
|
||||
if (!self->exploded && self->health>0)
|
||||
{
|
||||
self->health = 0;
|
||||
G_BreakGlass(self, activator, activator, self->s.origin, MOD_TRIGGER_HURT, self->health);
|
||||
|
@ -806,6 +809,25 @@ Type is the value set in the type key. Texture is any texture(s) referenced by t
|
|||
If you wish to add a custom breakable to your map, please include your mapname (or perhaps 3 letters of it) in the type name to prevent conflicts (i.e. don't use 'brick', use 'tequila_brick' or just 'teq_brick'). See the breakables folder included in Reaction Quake 3 for the proper format.
|
||||
*/
|
||||
|
||||
static void InitBreakable_Finish(gentity_t * ent)
|
||||
{
|
||||
char info[MAX_INFO_STRING];
|
||||
|
||||
ent->think = NULL;
|
||||
ent->nextthink = 0;
|
||||
if (ent->s.weapon < 0 || ent->s.weapon >= RQ3_MAX_BREAKABLES) {
|
||||
G_Printf(S_COLOR_RED, "ERROR: Invalid func_breakable id (%d)\n", ent->s.weapon);
|
||||
G_FreeEntity(ent, __LINE__, __FILE__);
|
||||
}
|
||||
trap_GetConfigstring(CS_BREAKABLES + ent->s.weapon, info, sizeof(info));
|
||||
if (strlen(Info_ValueForKey(info, "type")) == 0) {
|
||||
G_Printf(S_COLOR_RED, "ERROR: Invalid func_breakable id (%d)\n", ent->s.weapon);
|
||||
G_FreeEntity(ent, __LINE__, __FILE__);
|
||||
}
|
||||
ent->s.eventParm |= (ent->s.weapon & 0x0FFF);
|
||||
ent->s.weapon = 0;
|
||||
}
|
||||
|
||||
void SP_func_breakable(gentity_t * ent)
|
||||
{
|
||||
int health;
|
||||
|
@ -888,28 +910,39 @@ void SP_func_breakable(gentity_t * ent)
|
|||
ent->damage_radius = GRENADE_SPLASH_RADIUS;
|
||||
}
|
||||
ent->use = Use_Breakable;
|
||||
ent->s.eventParm = amount << 6;
|
||||
|
||||
G_SpawnString("id", "0", &id);
|
||||
if (atoi(id) < 0 || atoi(id) >= RQ3_MAX_BREAKABLES) {
|
||||
G_Printf("^2ERROR: ID too high\n");
|
||||
G_FreeEntity(ent, __LINE__, __FILE__);
|
||||
return;
|
||||
//Makro - new code
|
||||
if (G_SpawnInt("type_id", "0", &ent->s.weapon)) {
|
||||
ent->think = InitBreakable_Finish;
|
||||
ent->nextthink = level.time + FRAMETIME;
|
||||
} else {
|
||||
G_SpawnString("id", "0", &id);
|
||||
if (atoi(id) < 0 || atoi(id) >= RQ3_MAX_BREAKABLES) {
|
||||
G_Printf("^2ERROR: ID too high\n");
|
||||
G_FreeEntity(ent, __LINE__, __FILE__);
|
||||
return;
|
||||
}
|
||||
//Com_Printf("ID (%d) ", id);
|
||||
if (!G_SpawnString("type", "", &name)) {
|
||||
G_Printf("^2ERROR: broken breakable name (%s)\n", name);
|
||||
G_FreeEntity(ent, __LINE__, __FILE__);
|
||||
return;
|
||||
}
|
||||
//Com_Printf("type (%s)\n",name);
|
||||
G_SpawnString("force", "7", &velocity);
|
||||
|
||||
G_SpawnString("lift", "5", &jump);
|
||||
//Elder: merge the bits
|
||||
ent->s.eventParm |= (atoi(id) & 0x0FFF);
|
||||
|
||||
Info_SetValueForKey(breakinfo, "type", name);
|
||||
Info_SetValueForKey(breakinfo, "velocity", velocity);
|
||||
Info_SetValueForKey(breakinfo, "jump", jump);
|
||||
//Makro - not needed
|
||||
//Info_SetValueForKey(breakinfo, "id", id);
|
||||
trap_SetConfigstring(CS_BREAKABLES + atoi(id), breakinfo);
|
||||
}
|
||||
//Com_Printf("ID (%d) ", id);
|
||||
if (!G_SpawnString("type", "", &name)) {
|
||||
G_Printf("^2ERROR: broken breakable name (%s)\n", name);
|
||||
G_FreeEntity(ent, __LINE__, __FILE__);
|
||||
return;
|
||||
}
|
||||
//Com_Printf("type (%s)\n",name);
|
||||
G_SpawnString("force", "7", &velocity);
|
||||
|
||||
G_SpawnString("lift", "5", &jump);
|
||||
|
||||
amount = amount << 6;
|
||||
|
||||
//Elder: merge the bits
|
||||
ent->s.eventParm = amount | (atoi(id) & 0x0FFF);
|
||||
|
||||
ent->health = health;
|
||||
ent->health_saved = health;
|
||||
|
@ -929,11 +962,6 @@ void SP_func_breakable(gentity_t * ent)
|
|||
//Makro - added this so spectators can go through breakables
|
||||
//ent->nextthink = level.time + FRAMETIME;
|
||||
//ent->think = Think_SpawnNewDoorTrigger;
|
||||
Info_SetValueForKey(breakinfo, "type", name);
|
||||
Info_SetValueForKey(breakinfo, "velocity", velocity);
|
||||
Info_SetValueForKey(breakinfo, "jump", jump);
|
||||
Info_SetValueForKey(breakinfo, "id", id);
|
||||
trap_SetConfigstring(CS_BREAKABLES + atoi(id), breakinfo);
|
||||
|
||||
trap_RQ3LinkEntity(ent, __LINE__, __FILE__);
|
||||
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.60 2003/08/10 20:13:26 makro
|
||||
// no message
|
||||
//
|
||||
// Revision 1.59 2003/07/30 16:05:46 makro
|
||||
// no message
|
||||
//
|
||||
|
@ -2077,33 +2080,84 @@ void Reached_Train(gentity_t * ent)
|
|||
//G_Printf("^3Train is at (%f %f %f) or (%f %f %f)\n",ent->s.origin[0],ent->s.origin[1],ent->s.origin[2], ent->pos1[0], ent->pos1[1], ent->pos1[2]);
|
||||
//G_Printf("^2NextTrain Origin(%f, %f, %f) Next Origin (%f, %f, %f)\n", next->nextTrain->s.origin[0], next->nextTrain->s.origin[1], next->nextTrain->s.origin[2], next->s.origin[0], next->s.origin[1], next->s.origin[2]);
|
||||
|
||||
VectorCopy(next->s.origin, ent->pos1);
|
||||
VectorCopy(next->nextTrain->s.origin, ent->pos2);
|
||||
//Makro - restore origin
|
||||
VectorCopy(ent->backup_origin, ent->s.origin2);
|
||||
|
||||
//Makro - moving train
|
||||
if ( !(next->spawnflags & 1) ) {
|
||||
VectorCopy(next->s.origin, ent->pos1);
|
||||
VectorCopy(next->nextTrain->s.origin, ent->pos2);
|
||||
|
||||
// if the path_corner has a speed, use that
|
||||
if (next->speed) {
|
||||
speed = next->speed;
|
||||
} else {
|
||||
// otherwise use the train's speed
|
||||
speed = ent->speed;
|
||||
}
|
||||
if (speed < 1) {
|
||||
speed = 1;
|
||||
}
|
||||
// calculate duration
|
||||
VectorSubtract(ent->pos2, ent->pos1, move);
|
||||
length = VectorLength(move);
|
||||
|
||||
ent->s.pos.trDuration = length * 1000 / speed;
|
||||
// start it going
|
||||
SetMoverState(ent, MOVER_1TO2, level.time);
|
||||
ent->s.apos.trType = TR_STATIONARY;
|
||||
VectorCopy(ent->s.origin2, ent->backup_origin);
|
||||
|
||||
// if the path_corner has a speed, use that
|
||||
if (next->speed) {
|
||||
speed = next->speed;
|
||||
//rotating train
|
||||
} else {
|
||||
// otherwise use the train's speed
|
||||
speed = ent->speed;
|
||||
}
|
||||
if (speed < 1) {
|
||||
speed = 1;
|
||||
}
|
||||
// calculate duration
|
||||
VectorSubtract(ent->pos2, ent->pos1, move);
|
||||
length = VectorLength(move);
|
||||
float dist;
|
||||
vec3_t a, b;
|
||||
|
||||
ent->s.pos.trDuration = length * 1000 / speed;
|
||||
//temp hack !!
|
||||
VectorSet(next->s.origin2, 128, 128, 0);
|
||||
|
||||
//debug info
|
||||
G_Printf(S_COLOR_YELLOW"Rotating train: %s\n", vtos(next->s.origin2));
|
||||
|
||||
if (next->speed) {
|
||||
speed = next->speed;
|
||||
} else {
|
||||
// otherwise use the train's speed
|
||||
speed = ent->speed;
|
||||
}
|
||||
if (speed < 1) {
|
||||
speed = 1;
|
||||
}
|
||||
|
||||
VectorSubtract(next->s.origin, next->s.origin2, a);
|
||||
VectorSubtract(next->nextTrain->s.origin, next->s.origin2, b);
|
||||
dist = acos( DotProduct(a, b) / (VectorLength(a) * VectorLength(b)) ) * 180.0f / M_PI;
|
||||
G_Printf(S_COLOR_YELLOW"Rotating train: dist = %f\n", dist);
|
||||
|
||||
//VectorClear(ent->movedir);
|
||||
VectorSet(ent->movedir, 0, 1, 0);
|
||||
VectorCopy(ent->r.currentAngles, ent->pos1);
|
||||
VectorMA(ent->pos1, dist, ent->movedir, ent->pos2);
|
||||
VectorCopy(ent->s.origin2, ent->backup_origin);
|
||||
VectorCopy(next->s.origin2, ent->s.origin2);
|
||||
|
||||
// set origin
|
||||
VectorCopy(next->s.origin2, ent->s.pos.trBase);
|
||||
ent->s.pos.trType = TR_STATIONARY;
|
||||
VectorCopy(next->s.origin, ent->r.currentOrigin);
|
||||
|
||||
VectorCopy(ent->pos1, ent->s.apos.trBase);
|
||||
|
||||
// calculate time to reach second position from speed
|
||||
ent->s.apos.trDuration = dist * 1000 / speed;
|
||||
|
||||
// start it going
|
||||
SetMoverState(ent, ROTATOR_1TO2, level.time);
|
||||
}
|
||||
|
||||
// looping sound
|
||||
ent->s.loopSound = next->soundLoop;
|
||||
|
||||
// start it going
|
||||
SetMoverState(ent, MOVER_1TO2, level.time);
|
||||
//debug!!!
|
||||
//G_Printf("^4Got past SetMoverState\n\n");
|
||||
|
||||
// if there is a "wait" value on the target, don't start moving yet
|
||||
if (next->wait) {
|
||||
ent->nextthink = level.time + next->wait * 1000;
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.45 2003/08/10 20:13:26 makro
|
||||
// no message
|
||||
//
|
||||
// Revision 1.44 2003/04/26 22:33:06 jbravo
|
||||
// Wratted all calls to G_FreeEnt() to avoid crashing and provide debugging
|
||||
//
|
||||
|
@ -814,6 +817,7 @@ void SP_worldspawn(void)
|
|||
|
||||
vec3_t color;
|
||||
//int nodetail = 0;
|
||||
int i;
|
||||
char info[MAX_INFO_STRING];
|
||||
|
||||
G_SpawnString("classname", "", &s);
|
||||
|
@ -868,7 +872,25 @@ void SP_worldspawn(void)
|
|||
G_SpawnString("enableBreath", "0", &s);
|
||||
trap_Cvar_Set("g_enableBreath", s);
|
||||
|
||||
// q3f atmospheric stuff:
|
||||
//Makro - read func_breakable types
|
||||
if (G_SpawnInt("numbreakabletypes", "0", &i)) {
|
||||
int j;
|
||||
for (j=0; j<i && j<RQ3_MAX_BREAKABLES; j++) {
|
||||
char *type, *force, *lift;
|
||||
if (!G_SpawnString(va("b%d_type", j), "", &type))
|
||||
continue;
|
||||
G_SpawnString(va("b%d_force", j), "7", &force);
|
||||
G_SpawnString(va("b%d_lift", j), "5", &lift);
|
||||
info[0] = 0;
|
||||
Info_SetValueForKey(info, "type", type);
|
||||
Info_SetValueForKey(info, "velocity", force);
|
||||
Info_SetValueForKey(info, "jump", lift);
|
||||
trap_SetConfigstring(CS_BREAKABLES + j, info);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// q3f atmospheric stuff:
|
||||
G_SpawnString( "atmosphere", "", &s );
|
||||
trap_SetConfigstring( CS_ATMOSEFFECT, s ); // Atmospheric effect
|
||||
|
||||
|
|
|
@ -3,68 +3,16 @@
|
|||
<pre>
|
||||
<h1>Build Log</h1>
|
||||
<h3>
|
||||
--------------------Configuration: cgame - Win32 Release--------------------
|
||||
</h3>
|
||||
<h3>Command Lines</h3>
|
||||
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSPF0.tmp" with contents
|
||||
[
|
||||
/nologo /G6 /ML /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Fp"Release/cgame.pch" /YX /Fo"Release/" /Fd"Release/" /FD /c
|
||||
"C:\Games\Quake3\rq3source\reaction\cgame\cg_event.c"
|
||||
]
|
||||
Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSPF0.tmp"
|
||||
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSPF1.tmp" with contents
|
||||
[
|
||||
/nologo /base:"0x30000000" /subsystem:windows /dll /incremental:no /pdb:"Release/cgamex86.pdb" /map:"Release/cgamex86.map" /machine:I386 /def:".\cgame.def" /out:"../Release/cgamex86.dll" /implib:"Release/cgamex86.lib"
|
||||
.\Release\bg_misc.obj
|
||||
.\Release\bg_pmove.obj
|
||||
.\Release\bg_slidemove.obj
|
||||
.\Release\cg_atmospheric.obj
|
||||
.\Release\cg_consolecmds.obj
|
||||
.\Release\cg_draw.obj
|
||||
.\Release\cg_drawtools.obj
|
||||
.\Release\cg_effects.obj
|
||||
.\Release\cg_ents.obj
|
||||
.\Release\cg_event.obj
|
||||
.\Release\cg_info.obj
|
||||
.\Release\cg_localents.obj
|
||||
.\Release\cg_main.obj
|
||||
.\Release\cg_marks.obj
|
||||
.\Release\cg_players.obj
|
||||
.\Release\cg_playerstate.obj
|
||||
.\Release\cg_predict.obj
|
||||
.\Release\cg_scoreboard.obj
|
||||
.\Release\cg_servercmds.obj
|
||||
.\Release\cg_snapshot.obj
|
||||
.\Release\cg_syscalls.obj
|
||||
.\Release\cg_unlagged.obj
|
||||
.\Release\cg_view.obj
|
||||
.\Release\cg_weapons.obj
|
||||
.\Release\q_math.obj
|
||||
.\Release\q_shared.obj
|
||||
.\Release\ui_shared.obj
|
||||
]
|
||||
Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSPF1.tmp"
|
||||
<h3>Output Window</h3>
|
||||
Compiling...
|
||||
cg_event.c
|
||||
Linking...
|
||||
Creating library Release/cgamex86.lib and object Release/cgamex86.exp
|
||||
|
||||
|
||||
|
||||
<h3>Results</h3>
|
||||
cgamex86.dll - 0 error(s), 0 warning(s)
|
||||
<h3>
|
||||
--------------------Configuration: game - Win32 Release--------------------
|
||||
</h3>
|
||||
<h3>Command Lines</h3>
|
||||
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSPF5.tmp" with contents
|
||||
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP6FB.tmp" with contents
|
||||
[
|
||||
/nologo /G6 /ML /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /FR"c:\reactionoutput/" /Fp"c:\reactionoutput/game.pch" /YX /Fo"c:\reactionoutput/" /Fd"c:\reactionoutput/" /FD /c
|
||||
"C:\Games\Quake3\rq3source\reaction\game\g_weapon.c"
|
||||
"C:\Games\Quake3\rq3source\reaction\game\g_spawn.c"
|
||||
]
|
||||
Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSPF5.tmp"
|
||||
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSPF6.tmp" with contents
|
||||
Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP6FB.tmp"
|
||||
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP6FC.tmp" with contents
|
||||
[
|
||||
kernel32.lib user32.lib winmm.lib /nologo /base:"0x20000000" /subsystem:windows /dll /incremental:no /pdb:"c:\reactionoutput/qagamex86.pdb" /map:"c:\reactionoutput/qagamex86.map" /machine:I386 /def:".\game.def" /out:"..\Release/qagamex86.dll" /implib:"c:\reactionoutput/qagamex86.lib"
|
||||
\reactionoutput\ai_chat.obj
|
||||
|
@ -108,14 +56,13 @@ kernel32.lib user32.lib winmm.lib /nologo /base:"0x20000000" /subsystem:windows
|
|||
\reactionoutput\zcam.obj
|
||||
\reactionoutput\zcam_target.obj
|
||||
]
|
||||
Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSPF6.tmp"
|
||||
Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP6FC.tmp"
|
||||
<h3>Output Window</h3>
|
||||
Compiling...
|
||||
g_weapon.c
|
||||
C:\Games\Quake3\rq3source\reaction\game\g_weapon.c(1939) : warning C4701: local variable 'tr' may be used without having been initialized
|
||||
g_spawn.c
|
||||
Linking...
|
||||
Creating library c:\reactionoutput/qagamex86.lib and object c:\reactionoutput/qagamex86.exp
|
||||
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSPFA.tmp" with contents
|
||||
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP700.tmp" with contents
|
||||
[
|
||||
/nologo /o"c:\reactionoutput/game.bsc"
|
||||
\reactionoutput\ai_chat.sbr
|
||||
|
@ -158,23 +105,14 @@ Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSPFA.tmp" with conten
|
|||
\reactionoutput\rxn_game.sbr
|
||||
\reactionoutput\zcam.sbr
|
||||
\reactionoutput\zcam_target.sbr]
|
||||
Creating command line "bscmake.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSPFA.tmp"
|
||||
Creating command line "bscmake.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP700.tmp"
|
||||
Creating browse info file...
|
||||
<h3>Output Window</h3>
|
||||
|
||||
|
||||
|
||||
<h3>Results</h3>
|
||||
qagamex86.dll - 0 error(s), 1 warning(s)
|
||||
<h3>
|
||||
--------------------Configuration: ui - Win32 Release TA--------------------
|
||||
</h3>
|
||||
<h3>Command Lines</h3>
|
||||
|
||||
|
||||
|
||||
<h3>Results</h3>
|
||||
uix86.dll - 0 error(s), 0 warning(s)
|
||||
qagamex86.dll - 0 error(s), 0 warning(s)
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in a new issue