mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2025-02-17 01:22:32 +00:00
Sky portals
This commit is contained in:
parent
9d345618be
commit
c34f62b0b9
11 changed files with 254 additions and 110 deletions
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.32 2002/08/29 23:58:27 makro
|
||||
// Sky portals
|
||||
//
|
||||
// Revision 1.31 2002/08/27 05:10:42 niceass
|
||||
// new ctb marker shader names
|
||||
//
|
||||
|
@ -1070,54 +1073,68 @@ static void CG_AddCEntity(centity_t * cent)
|
|||
===============
|
||||
CG_AddPacketEntities
|
||||
|
||||
Makro - added skyportal param
|
||||
===============
|
||||
*/
|
||||
void CG_AddPacketEntities(void)
|
||||
void CG_AddPacketEntities(qboolean inSkyPortal)
|
||||
{
|
||||
int num;
|
||||
centity_t *cent;
|
||||
playerState_t *ps;
|
||||
int num;
|
||||
|
||||
// set cg.frameInterpolation
|
||||
if (cg.nextSnap) {
|
||||
int delta;
|
||||
//Makro - if we're rendering the entities in a sky portals, we don't need this stuff
|
||||
if (!inSkyPortal) {
|
||||
playerState_t *ps;
|
||||
|
||||
delta = (cg.nextSnap->serverTime - cg.snap->serverTime);
|
||||
if (delta == 0) {
|
||||
cg.frameInterpolation = 0;
|
||||
// set cg.frameInterpolation
|
||||
if (cg.nextSnap) {
|
||||
int delta;
|
||||
|
||||
delta = (cg.nextSnap->serverTime - cg.snap->serverTime);
|
||||
if (delta == 0) {
|
||||
cg.frameInterpolation = 0;
|
||||
} else {
|
||||
cg.frameInterpolation = (float) (cg.time - cg.snap->serverTime) / delta;
|
||||
}
|
||||
} else {
|
||||
cg.frameInterpolation = (float) (cg.time - cg.snap->serverTime) / delta;
|
||||
cg.frameInterpolation = 0; // actually, it should never be used, because
|
||||
// no entities7 should be marked as interpolating
|
||||
}
|
||||
} else {
|
||||
cg.frameInterpolation = 0; // actually, it should never be used, because
|
||||
// no entities7 should be marked as interpolating
|
||||
|
||||
// the auto-rotating items will all have the same axis
|
||||
cg.autoAngles[0] = 0;
|
||||
cg.autoAngles[1] = 0; //Blaze: changed this ( cg.time & 2047 ) * 360 / 2048.0; to 0;
|
||||
cg.autoAngles[2] = 0;
|
||||
|
||||
cg.autoAnglesFast[0] = 0;
|
||||
//Elder: restored for weapon rotation
|
||||
cg.autoAnglesFast[1] = (cg.time & 1023) * 360 / 1024.0f;
|
||||
cg.autoAnglesFast[2] = 0;
|
||||
|
||||
AnglesToAxis(cg.autoAngles, cg.autoAxis);
|
||||
AnglesToAxis(cg.autoAnglesFast, cg.autoAxisFast);
|
||||
|
||||
// generate and add the entity from the playerstate
|
||||
ps = &cg.predictedPlayerState;
|
||||
BG_PlayerStateToEntityState(ps, &cg.predictedPlayerEntity.currentState, qfalse);
|
||||
CG_AddCEntity(&cg.predictedPlayerEntity);
|
||||
|
||||
// lerp the non-predicted value for lightning gun origins
|
||||
CG_CalcEntityLerpPositions(&cg_entities[cg.snap->ps.clientNum]);
|
||||
}
|
||||
|
||||
// the auto-rotating items will all have the same axis
|
||||
cg.autoAngles[0] = 0;
|
||||
cg.autoAngles[1] = 0; //Blaze: changed this ( cg.time & 2047 ) * 360 / 2048.0; to 0;
|
||||
cg.autoAngles[2] = 0;
|
||||
|
||||
cg.autoAnglesFast[0] = 0;
|
||||
//Elder: restored for weapon rotation
|
||||
cg.autoAnglesFast[1] = (cg.time & 1023) * 360 / 1024.0f;
|
||||
cg.autoAnglesFast[2] = 0;
|
||||
|
||||
AnglesToAxis(cg.autoAngles, cg.autoAxis);
|
||||
AnglesToAxis(cg.autoAnglesFast, cg.autoAxisFast);
|
||||
|
||||
// generate and add the entity from the playerstate
|
||||
ps = &cg.predictedPlayerState;
|
||||
BG_PlayerStateToEntityState(ps, &cg.predictedPlayerEntity.currentState, qfalse);
|
||||
CG_AddCEntity(&cg.predictedPlayerEntity);
|
||||
|
||||
// lerp the non-predicted value for lightning gun origins
|
||||
CG_CalcEntityLerpPositions(&cg_entities[cg.snap->ps.clientNum]);
|
||||
|
||||
// add each entity sent over by the server
|
||||
for (num = 0; num < cg.snap->numEntities; num++) {
|
||||
cent = &cg_entities[cg.snap->entities[num].number];
|
||||
CG_AddCEntity(cent);
|
||||
if (inSkyPortal) {
|
||||
if (cent->currentState.eFlags & EF_SKYPORTAL) {
|
||||
CG_AddCEntity(cent);
|
||||
}
|
||||
} else {
|
||||
if (!(cent->currentState.eFlags & EF_SKYPORTAL)) {
|
||||
CG_AddCEntity(cent);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1169,25 +1186,29 @@ Use sparingly.
|
|||
*/
|
||||
static void CG_Dlight(centity_t * cent)
|
||||
{
|
||||
int cl;
|
||||
float i, r, g, b;
|
||||
//Makro - kinda hackish, but oh well...
|
||||
//allows us to trigger them on off; SVF_NOCLIENT should've done this already, though
|
||||
if (!(cent->currentState.eFlags & EF_NODRAW)) {
|
||||
int cl;
|
||||
float i, r, g, b;
|
||||
|
||||
cl = cent->currentState.constantLight;
|
||||
r = (cl & 255) / 255.0f;
|
||||
g = ((cl >> 8) & 255) / 255.0f;
|
||||
b = ((cl >> 16) & 255) / 255.0f;
|
||||
i = (cl >> 24) & 255 * 4;
|
||||
cl = cent->currentState.constantLight;
|
||||
r = (cl & 255) / 255.0f;
|
||||
g = ((cl >> 8) & 255) / 255.0f;
|
||||
b = ((cl >> 16) & 255) / 255.0f;
|
||||
i = (cl >> 24) & 255 * 4;
|
||||
|
||||
if (cent->currentState.eventParm & DLIGHT_FLICKER)
|
||||
i += rand() % 100 - 50;
|
||||
if (cent->currentState.eventParm & DLIGHT_FLICKER)
|
||||
i += rand() % 100 - 50;
|
||||
|
||||
if (cent->currentState.eventParm & DLIGHT_PULSE)
|
||||
i *= 1.0f + sin(2 * M_PI * cg.time / 1000.0f);
|
||||
if (cent->currentState.eventParm & DLIGHT_PULSE)
|
||||
i *= 1.0f + sin(2 * M_PI * cg.time / 1000.0f);
|
||||
|
||||
if (cent->currentState.eventParm & DLIGHT_ADDITIVE)
|
||||
trap_R_AddAdditiveLightToScene(cent->lerpOrigin, i, r, g, b);
|
||||
else
|
||||
trap_R_AddLightToScene(cent->lerpOrigin, i, r, g, b);
|
||||
if (cent->currentState.eventParm & DLIGHT_ADDITIVE)
|
||||
trap_R_AddAdditiveLightToScene(cent->lerpOrigin, i, r, g, b);
|
||||
else
|
||||
trap_R_AddLightToScene(cent->lerpOrigin, i, r, g, b);
|
||||
|
||||
//CG_Printf("cgame: (%f %f %f) %f\n", r, g, b, i );
|
||||
//CG_Printf("cgame: (%f %f %f) %f\n", r, g, b, i );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.125 2002/08/29 23:58:28 makro
|
||||
// Sky portals
|
||||
//
|
||||
// Revision 1.124 2002/08/29 14:24:43 niceass
|
||||
// new wallhack thing
|
||||
//
|
||||
|
@ -1961,7 +1964,9 @@ void CG_PainEvent(centity_t * cent, int health);
|
|||
// cg_ents.c
|
||||
//
|
||||
void CG_SetEntitySoundPosition(centity_t * cent);
|
||||
void CG_AddPacketEntities(void);
|
||||
//Makro - added skyportal param
|
||||
//void CG_AddPacketEntities(void);
|
||||
void CG_AddPacketEntities(qboolean inSkyPortal);
|
||||
void CG_Beam(centity_t * cent);
|
||||
void CG_AdjustPositionForMover(const vec3_t in, int moverNum, int fromTime, int toTime, vec3_t out);
|
||||
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.28 2002/08/29 23:58:28 makro
|
||||
// Sky portals
|
||||
//
|
||||
// Revision 1.27 2002/08/29 04:42:41 blaze
|
||||
// Anti OGC code
|
||||
//
|
||||
|
@ -1180,30 +1183,43 @@ void CG_DrawActiveFrame(int serverTime, stereoFrame_t stereoView, qboolean demoP
|
|||
CG_DamageBlendBlob();
|
||||
}
|
||||
|
||||
/*
|
||||
//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]);
|
||||
}
|
||||
}
|
||||
|
||||
//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")) {
|
||||
//vec3_t oldOrigin;
|
||||
refdef_t skyRef;
|
||||
CG_AddPacketEntities(qtrue);
|
||||
memset(&skyRef, 0, sizeof(skyRef));
|
||||
memcpy(&skyRef, &cg.refdef, sizeof(skyRef));
|
||||
//VectorCopy(cg.refdef.vieworg, oldOrigin);
|
||||
skyRef.vieworg[0] = atof(Info_ValueForKey(info, "x"));
|
||||
skyRef.vieworg[1] = atof(Info_ValueForKey(info, "y"));
|
||||
skyRef.vieworg[2] = atof(Info_ValueForKey(info, "z"));
|
||||
memset(skyRef.areamask, 0, sizeof(skyRef.areamask));
|
||||
//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]);
|
||||
trap_R_RenderScene(&skyRef);
|
||||
//trap_R_ClearScene();
|
||||
//VectorCopy(oldOrigin, cg.refdef.vieworg);
|
||||
}
|
||||
*/
|
||||
|
||||
// build the render lists
|
||||
if (!cg.hyperspace) {
|
||||
CG_AddPacketEntities(); // adter calcViewValues, so predicted player state is correct
|
||||
CG_AddPacketEntities(qfalse); // adter calcViewValues, so predicted player state is correct
|
||||
CG_AddMarks();
|
||||
CG_AddParticles();
|
||||
CG_AddLocalEntities();
|
||||
|
@ -1256,19 +1272,6 @@ void CG_DrawActiveFrame(int serverTime, stereoFrame_t stereoView, qboolean demoP
|
|||
trap_Cvar_Set("timescale", va("%f", cg_timescale.value));
|
||||
}
|
||||
}
|
||||
//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]);
|
||||
}
|
||||
}
|
||||
|
||||
// actually issue the rendering calls
|
||||
CG_DrawActive(stereoView);
|
||||
|
|
|
@ -193,6 +193,10 @@ SOURCE=..\game\bg_slidemove.c
|
|||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cg_atmospheric.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\cg_consolecmds.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
|
|
@ -11,6 +11,74 @@
|
|||
|
||||
<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\RSPB82.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
|
||||
\reactionoutput\ai_cmd.obj
|
||||
\reactionoutput\ai_dmnet.obj
|
||||
\reactionoutput\ai_dmq3.obj
|
||||
\reactionoutput\ai_main.obj
|
||||
\reactionoutput\ai_team.obj
|
||||
\reactionoutput\ai_vcmd.obj
|
||||
\reactionoutput\bg_misc.obj
|
||||
\reactionoutput\bg_pmove.obj
|
||||
\reactionoutput\bg_slidemove.obj
|
||||
\reactionoutput\g_active.obj
|
||||
\reactionoutput\g_arenas.obj
|
||||
\reactionoutput\g_bot.obj
|
||||
\reactionoutput\g_client.obj
|
||||
\reactionoutput\g_cmds.obj
|
||||
\reactionoutput\g_combat.obj
|
||||
\reactionoutput\g_fileio.obj
|
||||
\reactionoutput\g_items.obj
|
||||
\reactionoutput\g_main.obj
|
||||
\reactionoutput\g_matchmode.obj
|
||||
\reactionoutput\g_mem.obj
|
||||
\reactionoutput\g_misc.obj
|
||||
\reactionoutput\g_missile.obj
|
||||
\reactionoutput\g_mover.obj
|
||||
\reactionoutput\g_session.obj
|
||||
\reactionoutput\g_spawn.obj
|
||||
\reactionoutput\g_svcmds.obj
|
||||
\reactionoutput\g_syscalls.obj
|
||||
\reactionoutput\g_target.obj
|
||||
\reactionoutput\g_team.obj
|
||||
\reactionoutput\g_teamplay.obj
|
||||
\reactionoutput\g_trigger.obj
|
||||
\reactionoutput\g_utils.obj
|
||||
\reactionoutput\g_weapon.obj
|
||||
\reactionoutput\q_math.obj
|
||||
\reactionoutput\q_shared.obj
|
||||
\reactionoutput\rxn_game.obj
|
||||
\reactionoutput\zcam.obj
|
||||
\reactionoutput\zcam_target.obj
|
||||
]
|
||||
Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSPB82.tmp"
|
||||
<h3>Output Window</h3>
|
||||
Linking...
|
||||
Creating library c:\reactionoutput/qagamex86.lib and object c:\reactionoutput/qagamex86.exp
|
||||
g_misc.obj : error LNK2001: unresolved external symbol _trap_GetConfigString
|
||||
..\Release/qagamex86.dll : fatal error LNK1120: 1 unresolved externals
|
||||
Error executing link.exe.
|
||||
|
||||
|
||||
|
||||
<h3>Results</h3>
|
||||
qagamex86.dll - 2 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.95 2002/08/30 00:00:16 makro
|
||||
// Sky portals
|
||||
//
|
||||
// Revision 1.94 2002/08/25 00:47:00 niceass
|
||||
// q3f atmosphere
|
||||
//
|
||||
|
@ -800,6 +803,8 @@ typedef enum {
|
|||
#define EF_AWARD_ASSIST 0x00020000 // draw a assist sprite
|
||||
#define EF_AWARD_DENIED 0x00040000 // denied
|
||||
#define EF_TEAMVOTED 0x00080000 // already cast a team vote
|
||||
#define EF_SKYPORTAL 0x00000200 // Makro - the entity is in a sky portal; 0x00100000 didn't seem to work
|
||||
|
||||
|
||||
// NOTE: may not have more than 16
|
||||
typedef enum {
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.121 2002/08/30 00:00:16 makro
|
||||
// Sky portals
|
||||
//
|
||||
// Revision 1.120 2002/08/28 23:10:06 jbravo
|
||||
// Added cg_RQ3_SuicideLikeARealMan, timestamping to server logs and
|
||||
// fixed stats for non-TP modes.
|
||||
|
@ -1042,7 +1045,8 @@ void trigger_teleporter_touch(gentity_t * self, gentity_t * other, trace_t * tra
|
|||
//
|
||||
void TeleportPlayer(gentity_t * player, vec3_t origin, vec3_t angles);
|
||||
void G_BreakGlass(gentity_t * ent, gentity_t * inflictor, gentity_t * attacker, vec3_t point, int mod, int damage); //Blaze: Breakable glass
|
||||
void G_RunDlight(gentity_t * ent); // Elder: dlight running
|
||||
//Makro - not needed
|
||||
//void G_RunDlight(gentity_t * ent); // Elder: dlight running
|
||||
void G_EvaluateTrajectory(const trajectory_t * tr, int atTime, vec3_t result);
|
||||
void G_EvaluateTrajectoryDelta(const trajectory_t * tr, int atTime, vec3_t result);
|
||||
void G_GravityChange(void);
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.113 2002/08/30 00:00:16 makro
|
||||
// Sky portals
|
||||
//
|
||||
// Revision 1.112 2002/08/29 23:47:10 jbravo
|
||||
// Disabled drop case and fixed a padding problem in the date code.
|
||||
//
|
||||
|
@ -2527,11 +2530,13 @@ void G_RunFrame(int levelTime)
|
|||
G_RunMover(ent);
|
||||
continue;
|
||||
}
|
||||
/*
|
||||
// Elder: run dynamic lights
|
||||
if (ent->s.eType == ET_DLIGHT) {
|
||||
G_RunDlight(ent);
|
||||
continue;
|
||||
}
|
||||
*/
|
||||
|
||||
if (i < MAX_CLIENTS) {
|
||||
G_RunClient(ent); // Basicly calls ClientThink_real()
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.62 2002/08/30 00:00:16 makro
|
||||
// Sky portals
|
||||
//
|
||||
// Revision 1.61 2002/08/25 07:07:42 niceass
|
||||
// added "life" setting to func_pressure
|
||||
//
|
||||
|
@ -209,12 +212,15 @@ Set the color key for the intended color
|
|||
*/
|
||||
void use_dlight(gentity_t * ent, gentity_t * other, gentity_t * activator)
|
||||
{
|
||||
ent->unbreakable ^= 1;
|
||||
ent->unbreakable = !ent->unbreakable;
|
||||
if (ent->unbreakable) {
|
||||
ent->r.svFlags &= ~SVF_NOCLIENT;
|
||||
} else {
|
||||
ent->r.svFlags |= SVF_NOCLIENT;
|
||||
ent->s.eFlags |= EF_NODRAW;
|
||||
} else {
|
||||
ent->r.svFlags &= ~SVF_NOCLIENT;
|
||||
ent->s.eFlags &= ~EF_NODRAW;
|
||||
}
|
||||
//G_Printf("\nUsing dlight: %d\n\n", ent->unbreakable);
|
||||
}
|
||||
|
||||
void SP_dlight(gentity_t * ent)
|
||||
|
@ -239,14 +245,12 @@ void SP_dlight(gentity_t * ent)
|
|||
ent->s.eventParm |= DLIGHT_STROBE;
|
||||
|
||||
//Makro - added START_OFF flag
|
||||
if (ent->spawnflags & 16) {
|
||||
ent->unbreakable = 1;
|
||||
ent->r.svFlags &= ~SVF_NOCLIENT;
|
||||
} else {
|
||||
ent->unbreakable = 0;
|
||||
ent->r.svFlags |= SVF_NOCLIENT;
|
||||
}
|
||||
ent->use = use_dlight;
|
||||
ent->unbreakable = qfalse;
|
||||
if (ent->spawnflags & 16) {
|
||||
ent->unbreakable = qtrue;
|
||||
ent->use(ent, NULL, NULL);
|
||||
}
|
||||
|
||||
r = color[0] * 255;
|
||||
if (r > 255) {
|
||||
|
@ -275,11 +279,13 @@ void SP_dlight(gentity_t * ent)
|
|||
trap_LinkEntity(ent);
|
||||
}
|
||||
|
||||
/*
|
||||
// Nothing significant to do
|
||||
void G_RunDlight(gentity_t * ent)
|
||||
{
|
||||
trap_LinkEntity(ent);
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
=================================================================================
|
||||
|
@ -445,7 +451,7 @@ void SP_misc_portal_surface(gentity_t * ent)
|
|||
ent->spawnflags--;
|
||||
} else {
|
||||
if (ent->count < 2) {
|
||||
G_Printf("Cycling misc_portal_surface with no count at %s\n", vtos(ent->s.origin));
|
||||
G_Printf("Cycling misc_portal_surface with count < 2 at %s\n", vtos(ent->s.origin));
|
||||
ent->spawnflags--;
|
||||
} else {
|
||||
ent->size = 0;
|
||||
|
@ -480,31 +486,44 @@ void SP_misc_portal_camera(gentity_t * ent)
|
|||
}
|
||||
|
||||
//Makro - sky portals
|
||||
void SP_misc_sky_portal(gentity_t * ent) {
|
||||
gentity_t *skyportal = G_Find(NULL, FOFS(targetname), ent->target);
|
||||
|
||||
G_Printf("^1 SKY PORTAL !!!\n");
|
||||
|
||||
VectorClear(ent->r.mins);
|
||||
VectorClear(ent->r.maxs);
|
||||
trap_LinkEntity(ent);
|
||||
//ent->r.svFlags = SVF_PORTAL;
|
||||
void SP_misc_sky_portal(gentity_t * ent)
|
||||
{
|
||||
char info[MAX_INFO_STRING];
|
||||
trap_GetConfigstring(CS_SKYPORTAL, info, sizeof(info));
|
||||
|
||||
if (skyportal) {
|
||||
char info[MAX_INFO_STRING];
|
||||
memset(info, 0, sizeof(info));
|
||||
Info_SetValueForKey(info, "x", va("%f", skyportal->s.origin[0]));
|
||||
Info_SetValueForKey(info, "y", va("%f", skyportal->s.origin[1]));
|
||||
Info_SetValueForKey(info, "z", va("%f", skyportal->s.origin[2]));
|
||||
G_Printf("Sky portal origin: %s\n", vtos(skyportal->s.origin));
|
||||
trap_SetConfigstring(CS_SKYPORTAL, info);
|
||||
VectorCopy(skyportal->s.origin, ent->s.origin2);
|
||||
//ent->r.ownerNum = skyportal->s.number;
|
||||
//ent->s.eType = ET_PORTAL;
|
||||
ent->r.svFlags |= SVF_PORTAL;
|
||||
|
||||
if (!info[0]) {
|
||||
gentity_t *skyportal = G_Find(NULL, FOFS(targetname), ent->target);
|
||||
|
||||
//G_Printf("^1 SKY PORTAL !!!\n");
|
||||
|
||||
VectorClear(ent->r.mins);
|
||||
VectorClear(ent->r.maxs);
|
||||
trap_LinkEntity(ent);
|
||||
|
||||
if (skyportal) {
|
||||
memset(info, 0, sizeof(info));
|
||||
Info_SetValueForKey(info, "x", va("%f", skyportal->s.origin[0]));
|
||||
Info_SetValueForKey(info, "y", va("%f", skyportal->s.origin[1]));
|
||||
Info_SetValueForKey(info, "z", va("%f", skyportal->s.origin[2]));
|
||||
Info_SetValueForKey(info, "n", va("%i", skyportal->s.number));
|
||||
//G_Printf("Sky portal origin: %s\n", vtos(skyportal->s.origin));
|
||||
trap_SetConfigstring(CS_SKYPORTAL, info);
|
||||
VectorCopy(skyportal->s.origin, ent->s.origin2);
|
||||
ent->r.ownerNum = skyportal->s.number;
|
||||
//ent->s.eType = ET_PORTAL;
|
||||
//ent->r.svFlags |= SVF_BROADCAST;
|
||||
} else {
|
||||
G_Printf("misc_sky_portal entity with bad target at %s\n", vtos(ent->s.origin));
|
||||
trap_SetConfigstring(CS_SKYPORTAL, "");
|
||||
G_FreeEntity(ent);
|
||||
}
|
||||
} else {
|
||||
G_Printf("misc_sky_portal entity with bad target at %s\n", vtos(ent->s.origin));
|
||||
trap_SetConfigstring(CS_SKYPORTAL, "none");
|
||||
G_FreeEntity(ent);
|
||||
ent->s.origin2[0] = atof(Info_ValueForKey(info, "x"));
|
||||
ent->s.origin2[1] = atof(Info_ValueForKey(info, "y"));
|
||||
ent->s.origin2[2] = atof(Info_ValueForKey(info, "z"));
|
||||
ent->r.ownerNum = atoi(Info_ValueForKey(info, "n"));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.39 2002/08/30 00:00:16 makro
|
||||
// Sky portals
|
||||
//
|
||||
// Revision 1.38 2002/08/25 00:46:52 niceass
|
||||
// q3f atmosphere
|
||||
//
|
||||
|
@ -688,6 +691,13 @@ void G_SpawnGEntityFromSpawnVars(void)
|
|||
if (!G_CallSpawn(ent)) {
|
||||
G_FreeEntity(ent);
|
||||
}
|
||||
|
||||
//Makro - is the entity in a sky portal ?
|
||||
if (G_SpawnInt("skyportalent", "0", &i)) {
|
||||
if (i) {
|
||||
ent->s.eFlags |= EF_SKYPORTAL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -15,13 +15,13 @@ cgamex86.dll - 0 error(s), 0 warning(s)
|
|||
--------------------Configuration: game - Win32 Release--------------------
|
||||
</h3>
|
||||
<h3>Command Lines</h3>
|
||||
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP7F.tmp" with contents
|
||||
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP12.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_cmds.c"
|
||||
"C:\Games\Quake3\rq3source\reaction\game\g_misc.c"
|
||||
]
|
||||
Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP7F.tmp"
|
||||
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP80.tmp" with contents
|
||||
Creating command line "cl.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP12.tmp"
|
||||
Creating temporary file "D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP13.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
|
||||
|
@ -64,10 +64,10 @@ 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\RSP80.tmp"
|
||||
Creating command line "link.exe @D:\DOCUME~1\Andrei\LOCALS~1\Temp\RSP13.tmp"
|
||||
<h3>Output Window</h3>
|
||||
Compiling...
|
||||
g_cmds.c
|
||||
g_misc.c
|
||||
Linking...
|
||||
Creating library c:\reactionoutput/qagamex86.lib and object c:\reactionoutput/qagamex86.exp
|
||||
|
||||
|
|
Loading…
Reference in a new issue