mirror of
https://github.com/UberGames/RPG-X2.git
synced 2025-03-09 18:00:51 +00:00
Critical and minor bugfixes
- Fixed critical error in G_ParseField - Made other minor bugfix BIG ISSUES: RPG-X is now crashing to desktop without error when loading maps. I have no clue whats the problem ...
This commit is contained in:
parent
cf63b37933
commit
d3685e16d2
10 changed files with 27 additions and 26 deletions
|
@ -1241,11 +1241,13 @@ void CG_SmallSpark( vec3_t origin, vec3_t normal )
|
|||
{
|
||||
vec3_t dir, direction, start, end, velocity;
|
||||
float scale;
|
||||
float alpha;
|
||||
int numSparks;
|
||||
int j;
|
||||
int i;
|
||||
|
||||
AngleVectors( normal, normal, NULL, NULL );
|
||||
|
||||
int j;
|
||||
for ( j = 0; j < 3; j ++ )
|
||||
normal[j] = normal[j] + (0.1f * crandom());
|
||||
|
||||
|
@ -1253,7 +1255,6 @@ void CG_SmallSpark( vec3_t origin, vec3_t normal )
|
|||
|
||||
numSparks = 6 + (random() * 4.0f );
|
||||
|
||||
int i;
|
||||
for ( i = 0; i < numSparks; i++ )
|
||||
{
|
||||
scale = 0.1f + (random() *0.2f );
|
||||
|
@ -1278,7 +1279,7 @@ void CG_SmallSpark( vec3_t origin, vec3_t normal )
|
|||
VectorMA( origin, 1, normal, direction );
|
||||
|
||||
scale = 2.0f + (random() * 3.0f );
|
||||
float alpha = 0.6f + (random() * 0.4f );
|
||||
alpha = 0.6f + (random() * 0.4f );
|
||||
|
||||
VectorSet( velocity, crandom() * 2, crandom() * 2, 8 + random() * 4 );
|
||||
VectorMA( velocity, 5, normal, velocity );
|
||||
|
@ -1303,6 +1304,7 @@ void CG_FireLaser( vec3_t start, vec3_t end, vec3_t normal, vec3_t laserRGB, flo
|
|||
sRGB;
|
||||
float scale = 1.0f;
|
||||
int life = 0;
|
||||
int t;
|
||||
|
||||
// Orient the laser spray
|
||||
VectorSubtract( end, start, dir );
|
||||
|
@ -1347,7 +1349,6 @@ void CG_FireLaser( vec3_t start, vec3_t end, vec3_t normal, vec3_t laserRGB, flo
|
|||
0.0f,
|
||||
200,
|
||||
cgs.media.waterDropShader );
|
||||
int t;
|
||||
for ( t=0; t < 2; t ++ )
|
||||
{
|
||||
VectorMA( pos, crandom() * 0.5f, right, work );
|
||||
|
@ -2049,7 +2050,7 @@ void CG_ShimmeryThing( vec3_t start, vec3_t end, vec3_t content )
|
|||
AngleVectors( angles, NULL, dir, NULL );
|
||||
|
||||
// See if the effect should be tapered at the top
|
||||
if ( taper = 2 )
|
||||
if ( taper == 2 )
|
||||
{
|
||||
VectorMA( start, content[1] * 0.25f, dir, top );
|
||||
}
|
||||
|
|
|
@ -99,8 +99,8 @@ qboolean LoadLuaFile(char *path, int num_vm)
|
|||
|
||||
qboolean CG_LuaInit()
|
||||
{
|
||||
char fxfilename[MAX_QPATH];
|
||||
fileHandle_t fxfile;
|
||||
/*char fxfilename[MAX_QPATH];
|
||||
fileHandle_t fxfile;*/
|
||||
|
||||
CG_Printf("------- CG_LuaInit -------\n");
|
||||
|
||||
|
|
|
@ -637,8 +637,8 @@ void CG_ShaderStateChanged(void) {
|
|||
if(!o) return;
|
||||
|
||||
while (o && *o) {
|
||||
n = strstr(o, "=");
|
||||
if (n && *n) {
|
||||
n = (char *)strstr(o, "=");
|
||||
if (n && n[0] && *n) {
|
||||
strncpy(originalShader, o, n-o);
|
||||
originalShader[n-o] = 0;
|
||||
n++;
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
|
||||
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
|
||||
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">C:\MinGW\include;$(IncludePath)</IncludePath>
|
||||
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(IncludePath)</IncludePath>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<Midl>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
// because games can change separately from the main system version, we need a
|
||||
// second version that must match between game and cgame
|
||||
#define RPGX_VERSION "2.2 Beta 8.4.7 wc 12.12.2011 1"
|
||||
#define RPGX_VERSION "2.2 Beta wc12122011a"
|
||||
#define RPGX_COMPILEDATE "20/05/11"
|
||||
#define RPGX_COMPILEDBY "GSIO01"
|
||||
//const char GAME_VERSION[] = strcat("RPG-X v",RPGX_VERSION);
|
||||
|
|
|
@ -1524,6 +1524,8 @@ void plasma_link( gentity_t *ent )
|
|||
//------------------------------------------
|
||||
void SP_fx_plasma( gentity_t *ent )
|
||||
{
|
||||
int t;
|
||||
|
||||
if (!ent->startRGBA)
|
||||
{
|
||||
ent->startRGBA[0] = 100;
|
||||
|
@ -1540,7 +1542,6 @@ void SP_fx_plasma( gentity_t *ent )
|
|||
G_SpawnInt( "damage", "0", &ent->damage );
|
||||
|
||||
// Convert from range of 0-255 to 0-1
|
||||
int t;
|
||||
for (t=0; t < 4; t++)
|
||||
{
|
||||
ent->startRGBA[t] = ent->startRGBA[t] / 255;
|
||||
|
@ -1890,6 +1891,8 @@ void borg_energy_beam_link( gentity_t *ent )
|
|||
//------------------------------------------
|
||||
void SP_fx_borg_energy_beam( gentity_t *ent )
|
||||
{
|
||||
int t;
|
||||
|
||||
G_SpawnFloat( "radius", "30", &ent->distance );
|
||||
G_SpawnFloat( "speed", "100", &ent->speed );
|
||||
if (!ent->startRGBA)
|
||||
|
@ -1899,7 +1902,6 @@ void SP_fx_borg_energy_beam( gentity_t *ent )
|
|||
}
|
||||
|
||||
// Convert from range of 0-255 to 0-1
|
||||
int t;
|
||||
for (t=0; t < 4; t++)
|
||||
{
|
||||
ent->startRGBA[t] = ent->startRGBA[t] / 255;
|
||||
|
|
|
@ -3463,36 +3463,31 @@ void toggle_stasis_door( gentity_t *ent )
|
|||
ent->nextthink = -1; // prevent thinking again until this think is finished
|
||||
if ( ent->wait >= 0 )
|
||||
{
|
||||
G_Printf(S_COLOR_MAGENTA "toggle_stasis_door: ent->wait >= 0\n");
|
||||
ent->think = locked_stasis_door;
|
||||
ent->nextthink = level.time + 50;
|
||||
}
|
||||
else
|
||||
{
|
||||
G_Printf(S_COLOR_MAGENTA "toggle_stasis_door: switch(ent->count)\n");
|
||||
ent->think = toggle_stasis_door;
|
||||
switch(ent->count) {
|
||||
case STASIS_DOOR_CLOSED: // then go to opening state
|
||||
G_Printf(S_COLOR_MAGENTA "toggle_stasis_door: STASIS_DOOR_CLOSED\n");
|
||||
G_AddEvent(ent, EV_STASIS_DOOR_OPENING, 0); // send event to client
|
||||
ent->count = STASIS_DOOR_OPENING;
|
||||
ent->nextthink = level.time + 1000;
|
||||
break;
|
||||
case STASIS_DOOR_CLOSING: // then go to closed state
|
||||
G_Printf(S_COLOR_MAGENTA "toggle_stasis_door: STASIS_DOOR_CLOSING\n");
|
||||
G_AddEvent(ent, EV_STASIS_DOOR_CLOSED, 0); // send event to client
|
||||
trap_LinkEntity(ent); // link entity again
|
||||
trap_AdjustAreaPortalState(ent, qfalse); // close AP
|
||||
ent->count = STASIS_DOOR_CLOSED;
|
||||
break;
|
||||
case STASIS_DOOR_OPENED: // then go to closing state
|
||||
G_Printf(S_COLOR_MAGENTA "toggle_stasis_door: STASIS_DOOR_OPENED\n");
|
||||
G_AddEvent(ent, EV_STASIS_DOOR_CLOSING, 0); // send event to client
|
||||
trap_UnlinkEntity(ent); // unlink entity
|
||||
ent->count = STASIS_DOOR_CLOSING;
|
||||
ent->nextthink = level.time + 1000;
|
||||
break;
|
||||
case STASIS_DOOR_OPENING: // then go to opened state
|
||||
G_Printf(S_COLOR_MAGENTA "toggle_stasis_door: STASIS_DOOR_OPENING\n");
|
||||
G_AddEvent(ent, EV_STASIS_DOOR_OPEN, 0); // send event to client
|
||||
trap_AdjustAreaPortalState(ent, qtrue); // open AP
|
||||
ent->count = STASIS_DOOR_OPENED;
|
||||
|
|
|
@ -598,10 +598,10 @@ qboolean G_ParseField( const char *key, const char *value, gentity_t *ent ) {
|
|||
break;
|
||||
case F_VECTOR4:
|
||||
i = sscanf (value, "%f %f %f %f", &vec4[0], &vec[1], &vec[2], &vec[3]);
|
||||
((float *)(b+f->ofs))[0] = vec[0];
|
||||
((float *)(b+f->ofs))[0] = vec[1];
|
||||
((float *)(b+f->ofs))[0] = vec[2];
|
||||
((float *)(b+f->ofs))[0] = vec[3];
|
||||
((float *)(b+f->ofs))[0] = vec4[0];
|
||||
((float *)(b+f->ofs))[0] = vec4[1];
|
||||
((float *)(b+f->ofs))[0] = vec4[2];
|
||||
((float *)(b+f->ofs))[0] = vec4[3];
|
||||
break;
|
||||
case F_INT:
|
||||
*(int *)(b+f->ofs) = atoi(value);
|
||||
|
|
|
@ -260,7 +260,7 @@ void Use_target_push( gentity_t *self, gentity_t *other, gentity_t *activator )
|
|||
}
|
||||
|
||||
//RPG-X: J2J noclip use
|
||||
if ( activator->client->ps.pm_type != PM_NORMAL || activator->client->ps.pm_type != PM_NOCLIP) {
|
||||
if ( (activator->client->ps.pm_type != PM_NORMAL) || (activator->client->ps.pm_type != PM_NOCLIP)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -962,11 +962,14 @@ void laser_arm_start (gentity_t *base)
|
|||
{
|
||||
vec3_t armAngles;
|
||||
vec3_t headAngles;
|
||||
gentity_t *arm;
|
||||
gentity_t *head;
|
||||
|
||||
|
||||
base->think = 0;
|
||||
//We're the base, spawn the arm and head
|
||||
gentity_t *arm = G_Spawn();
|
||||
gentity_t *head = G_Spawn();
|
||||
arm = G_Spawn();
|
||||
head = G_Spawn();
|
||||
|
||||
VectorCopy( base->s.angles, armAngles );
|
||||
VectorCopy( base->s.angles, headAngles );
|
||||
|
|
Loading…
Reference in a new issue