mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-11 15:52:30 +00:00
added force and buoyancy to breakables
This commit is contained in:
parent
58f3e4c5fa
commit
c598e866b1
8 changed files with 57 additions and 56 deletions
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.30 2002/05/19 21:27:51 blaze
|
||||
// added force and buoyancy to breakables
|
||||
//
|
||||
// Revision 1.29 2002/04/29 06:14:10 niceass
|
||||
// pressure
|
||||
//
|
||||
|
@ -1122,9 +1125,9 @@ void CG_BreakGlass( vec3_t playerOrigin, int glassParm, int number, int type, in
|
|||
value = states[rand()%numstates];
|
||||
|
||||
VectorCopy( playerOrigin, origin );
|
||||
velocity[0] = crandom() * GLASS_VELOCITY;
|
||||
velocity[1] = crandom() * GLASS_VELOCITY;
|
||||
velocity[2] = GLASS_JUMP + crandom() * GLASS_VELOCITY;
|
||||
velocity[0] = crandom() * 25 * cgs.media.breakables[id].velocity;
|
||||
velocity[1] = crandom() * 25 * cgs.media.breakables[id].velocity;
|
||||
velocity[2] = 25 * cgs.media.breakables[id].jump + crandom() * 25 * cgs.media.breakables[id].velocity;
|
||||
//Elder: added
|
||||
rotation[0] = crandom() * GLASS_VELOCITY;
|
||||
rotation[1] = crandom() * GLASS_VELOCITY;
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.79 2002/05/19 21:27:51 blaze
|
||||
// added force and buoyancy to breakables
|
||||
//
|
||||
// Revision 1.78 2002/05/19 21:04:37 jbravo
|
||||
// Tkok popup system
|
||||
//
|
||||
|
@ -914,6 +917,8 @@ typedef struct {
|
|||
sfxHandle_t sound[3];
|
||||
sfxHandle_t exp_sound;
|
||||
qhandle_t shader;
|
||||
int jump;
|
||||
int velocity;
|
||||
} breakable_t;
|
||||
|
||||
// all of the model, shader, and sound references that are
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.39 2002/05/19 21:27:51 blaze
|
||||
// added force and buoyancy to breakables
|
||||
//
|
||||
// Revision 1.38 2002/05/19 21:04:37 jbravo
|
||||
// Tkok popup system
|
||||
//
|
||||
|
@ -1284,7 +1287,8 @@ void CG_RQ3_Cmd () {
|
|||
Com_sprintf(playerName,sizeof(playerName),"%s",cgs.clientinfo->name);
|
||||
RemoveColorEscapeSequences(playerName);
|
||||
|
||||
Com_sprintf(scrnshotName, sizeof(scrnshotName), "record %s-%s-%d.%d.%d-%d.%d.%d\n", playerName, cgs.mapname, qtime.tm_year + 1900, qtime.tm_mon + 1, qtime.tm_mday, qtime.tm_hour, qtime.tm_min, qtime.tm_sec);
|
||||
//Com_sprintf(scrnshotName, sizeof(scrnshotName), "record %s-%s-%d.%d.%d-%d.%d.%d\n", playerName, cgs.mapname, qtime.tm_year + 1900, qtime.tm_mon + 1, qtime.tm_mday, qtime.tm_hour, qtime.tm_min, qtime.tm_sec);
|
||||
Com_sprintf(scrnshotName, sizeof(scrnshotName), "record %d-%d-%d_%d-%d-%d_%s_%s\n", qtime.tm_year + 1900, qtime.tm_mon + 1, qtime.tm_mday, qtime.tm_hour, qtime.tm_min, qtime.tm_sec, cgs.mapname, playerName);
|
||||
for (i=0;i<MAX_QPATH;i++)
|
||||
{
|
||||
switch (scrnshotName[i])
|
||||
|
@ -1319,7 +1323,8 @@ void CG_RQ3_Cmd () {
|
|||
trap_RealTime(&qtime);
|
||||
Com_sprintf(playerName,sizeof(playerName),"%s",cgs.clientinfo->name);
|
||||
RemoveColorEscapeSequences(playerName);
|
||||
Com_sprintf(scrnshotName, sizeof(scrnshotName), "screenshotjpeg %s-%d.%d.%d-%d.%d.%d\n", playerName, qtime.tm_year + 1900, qtime.tm_mon + 1, qtime.tm_mday, qtime.tm_hour, qtime.tm_min, qtime.tm_sec);
|
||||
//Com_sprintf(scrnshotName, sizeof(scrnshotName), "screenshotjpeg %s-%d.%d.%d-%d.%d.%d\n", playerName, qtime.tm_year + 1900, qtime.tm_mon + 1, qtime.tm_mday, qtime.tm_hour, qtime.tm_min, qtime.tm_sec);
|
||||
Com_sprintf(scrnshotName, sizeof(scrnshotName), "screenshotjpeg %d-%d-%d_%d-%d-%d_%s_%s\n", qtime.tm_year + 1900, qtime.tm_mon + 1, qtime.tm_mday, qtime.tm_hour, qtime.tm_min, qtime.tm_sec, cgs.mapname, playerName);
|
||||
for (i=0;i<MAX_QPATH;i++)
|
||||
{
|
||||
switch (scrnshotName[i])
|
||||
|
@ -1533,6 +1538,8 @@ static void CG_ServerCommand( void ) {
|
|||
cgs.media.breakables[id].sound[1] = trap_S_RegisterSound( va("breakables/%s/sounds/break2.wav", CG_Argv(2)), qfalse);
|
||||
cgs.media.breakables[id].sound[2] = trap_S_RegisterSound( va("breakables/%s/sounds/break3.wav", CG_Argv(2)), qfalse);
|
||||
cgs.media.breakables[id].exp_sound = trap_S_RegisterSound( va("breakables/%s/sounds/explosion.wav", CG_Argv(2)), qfalse);
|
||||
cgs.media.breakables[id].velocity = atoi(CG_Argv(3));
|
||||
cgs.media.breakables[id].jump = atoi(CG_Argv(4));
|
||||
return;
|
||||
} else {
|
||||
CG_Printf("ID was %d\n",id);
|
||||
|
|
|
@ -6,53 +6,11 @@
|
|||
--------------------Configuration: cgame - Win32 Debug--------------------
|
||||
</h3>
|
||||
<h3>Command Lines</h3>
|
||||
Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPFB.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
|
||||
"C:\Development\reaction\cgame\cg_servercmds.c"
|
||||
]
|
||||
Creating command line "cl.exe @C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPFB.tmp"
|
||||
Creating temporary file "C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\RSPFC.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:"../Debug/cgamex86.dll" /implib:"Debug/cgamex86.lib"
|
||||
.\Debug\bg_misc.obj
|
||||
.\Debug\bg_pmove.obj
|
||||
.\Debug\bg_slidemove.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_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\ADMINI~1\LOCALS~1\Temp\RSPFC.tmp"
|
||||
<h3>Output Window</h3>
|
||||
Compiling...
|
||||
cg_servercmds.c
|
||||
C:\Development\reaction\cgame\cg_servercmds.c(1224) : error C2115: '=' : incompatible types
|
||||
C:\Development\reaction\cgame\cg_servercmds.c(1282) : error C2095: 'Com_sprintf' : actual parameter has type 'void' : parameter 4
|
||||
Error executing cl.exe.
|
||||
|
||||
|
||||
|
||||
<h3>Results</h3>
|
||||
cgamex86.dll - 2 error(s), 0 warning(s)
|
||||
cgamex86.dll - 0 error(s), 0 warning(s)
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.67 2002/05/19 21:27:28 blaze
|
||||
// added force and buoyancy to breakables
|
||||
//
|
||||
// Revision 1.66 2002/05/19 21:04:37 jbravo
|
||||
// Tkok popup system
|
||||
//
|
||||
|
@ -166,7 +169,7 @@
|
|||
#define DLIGHT_STROBE 8
|
||||
|
||||
//Blaze: Max number of breakables
|
||||
#define RQ3_MAX_BREAKABLES 10
|
||||
#define RQ3_MAX_BREAKABLES 16
|
||||
|
||||
//Old debris definitions
|
||||
//Elder: debris bit parms to pass to break_glass - maybe I should enum this?
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.75 2002/05/19 21:27:28 blaze
|
||||
// added force and buoyancy to breakables
|
||||
//
|
||||
// Revision 1.74 2002/05/13 07:29:14 jbravo
|
||||
// Fixed server chrasing on incorrect models in TP and also added default skins
|
||||
//
|
||||
|
@ -173,8 +176,8 @@
|
|||
// JBravo: fixme. Hack to use SelectInitialSpawnPoint() in ClientSpawn.
|
||||
gentity_t *SelectInitialSpawnPoint( vec3_t origin, vec3_t angles );
|
||||
|
||||
//Blaze:for the breakable code
|
||||
char rq3_breakables[RQ3_MAX_BREAKABLES][80];
|
||||
//Blaze: for the breakables
|
||||
breakable_t rq3_breakables[RQ3_MAX_BREAKABLES];
|
||||
|
||||
#define RQ3_NONAMEPLAYER "Nameless"
|
||||
|
||||
|
@ -1202,9 +1205,9 @@ int G_SendBreakableInfo(int clientNum)
|
|||
char cl_breakableinfo[128];
|
||||
for (i=0;i< RQ3_MAX_BREAKABLES; i++)
|
||||
{
|
||||
if ( (strcmp(rq3_breakables[i],"") ) )
|
||||
if ( (strcmp(rq3_breakables[i].name,"") ) )
|
||||
{
|
||||
Com_sprintf(cl_breakableinfo, sizeof(cl_breakableinfo), "breakable %d %s\n",i,rq3_breakables[i]);
|
||||
Com_sprintf(cl_breakableinfo, sizeof(cl_breakableinfo), "breakable %d %s %d %d\n",i,rq3_breakables[i].name, rq3_breakables[i].velocity, rq3_breakables[i].jump);
|
||||
trap_SendServerCommand(clientNum, va("%s",cl_breakableinfo));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.81 2002/05/19 21:27:28 blaze
|
||||
// added force and buoyancy to breakables
|
||||
//
|
||||
// Revision 1.80 2002/05/12 00:07:47 slicer
|
||||
// Added Normal Radio Flood Protection
|
||||
//
|
||||
|
@ -1010,6 +1013,13 @@ void ClientUserinfoChanged( int clientNum );
|
|||
void ClientDisconnect( int clientNum );
|
||||
void ClientBegin( int clientNum );
|
||||
void ClientCommand( int clientNum );
|
||||
typedef struct {
|
||||
char name[80];
|
||||
int jump;
|
||||
int velocity;
|
||||
} breakable_t;
|
||||
extern breakable_t rq3_breakables[RQ3_MAX_BREAKABLES];
|
||||
|
||||
|
||||
//
|
||||
// g_active.c
|
||||
|
@ -1186,6 +1196,9 @@ extern vmCvar_t g_RQ3_IniFile;
|
|||
extern vmCvar_t g_RQ3_ValidIniFile;
|
||||
extern vmCvar_t g_RQ3_NextMapID;
|
||||
|
||||
|
||||
|
||||
|
||||
//Slicer: Radio flood protect
|
||||
extern vmCvar_t g_RQ3_radioRepeat;
|
||||
extern vmCvar_t g_RQ3_radioRepeatTime;
|
||||
|
|
|
@ -5,6 +5,9 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.39 2002/05/19 21:27:29 blaze
|
||||
// added force and buoyancy to breakables
|
||||
//
|
||||
// Revision 1.38 2002/05/12 13:37:25 makro
|
||||
// Bugs with entities
|
||||
//
|
||||
|
@ -83,7 +86,6 @@
|
|||
|
||||
#include "g_local.h"
|
||||
|
||||
extern char rq3_breakables[RQ3_MAX_BREAKABLES][80];
|
||||
|
||||
void G_ExplodeMissile( gentity_t *ent );
|
||||
//Makro - added
|
||||
|
@ -529,6 +531,8 @@ void SP_func_breakable( gentity_t *ent ) {
|
|||
int temp;
|
||||
int damage;
|
||||
int damage_radius;
|
||||
int velocity;
|
||||
int jump;
|
||||
char *name;
|
||||
|
||||
// Make it appear as the brush
|
||||
|
@ -616,7 +620,7 @@ void SP_func_breakable( gentity_t *ent ) {
|
|||
//Com_Printf("ID (%d) ", id);
|
||||
if (G_SpawnString( "type", "", &name) )
|
||||
{
|
||||
Q_strncpyz(rq3_breakables[id],name,80);
|
||||
Q_strncpyz(rq3_breakables[id].name,name,80);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -625,7 +629,12 @@ void SP_func_breakable( gentity_t *ent ) {
|
|||
return;
|
||||
}
|
||||
//Com_Printf("type (%s)\n",name);
|
||||
|
||||
G_SpawnInt( "force", "7", &velocity);
|
||||
rq3_breakables[id].velocity = velocity;
|
||||
|
||||
G_SpawnInt( "buoyancy", "5", &jump);
|
||||
rq3_breakables[id].jump = jump;
|
||||
|
||||
amount = amount << 6;
|
||||
|
||||
id = id & 0x0FFF;
|
||||
|
|
Loading…
Reference in a new issue