Jump to content

Home

Q3 Engine Game Bugs / JA bugs


ensiform

Recommended Posts

  • Replies 229
  • Created
  • Last Reply
  • 2 weeks later...

The warning is: warning C4204: nonstandard extension used : non-constant aggregate initializer

 

Just a little clarification - you may only initialize a const with a constant expression (i.e a number). The reason for this is simple - when the compiler compiles your code, the const variable is replaced by its value everywhere it appears. Initializing it with the value of another variable can't be resolved until run-time, therefore it's not an acceptable behavior.

 

Since the const variable must be resolved during compile time and not run-time, you get that error.

Link to comment
Share on other sites

not sure if this is a 'bug' ,

but vehicles do not open shields,

 

FIX:

void ShieldTouch(gentity_t *self, gentity_t *other, trace_t *trace)
{

gentity_t *owner;
owner=self->parent;

//Vehicle open shield's too! - GA
if(other->s.NPC_class == CLASS_VEHICLE) {
if(other->m_pVehicle->GA_LastRider==NULL)return;
else {
other = other->m_pVehicle->GA_LastRider;
if(!other->inuse || !other->client)return;
}
}

if (g_gametype.integer >= GT_TEAM)
{ // let teammates through
	// compare the parent's team to the "other's" team
	if (self->parent && ( self->parent->client) && (other->client))
	{
		if (OnSameTeam(self->parent, other))
		{
			ShieldGoNotSolid(self);
		}
	}
}
else
{//let the person who dropped the shield through
	if (self->parent && self->parent->s.number == other->s.number)
	{
		ShieldGoNotSolid(self);
	}
	else if(InSameGang(owner,other)) ShieldGoNotSolid(self);
	else if(self->genericValue13!=0 && self->genericValue13 <= other->client->pers.ShieldRank)ShieldGoNotSolid(self);//Rank based shiels
}
//NPC's who leader owns the shield

if (other && other->inuse && other->s.eType==ET_NPC){
//if(other->client->leader==owner)ShieldGoNotSolid(self);
///Not going to use the above way ,, just going to call ShieldTouch on the owner
ShieldTouch(self,other->client->leader,NULL);

}
}

Link to comment
Share on other sites

  • 2 months later...
  • 4 months later...

gloat really should only work when saber is out because it shows sparks even when weapon is not saber...

 

			if ( ent->client->ps.weapon == WP_SABER )
		{
			if ( ent->client->saber[0].gloatAnim != -1 )
			{
				anim = ent->client->saber[0].gloatAnim;
			}
			else if ( ent->client->saber[1].model 
					&& ent->client->saber[1].model[0]
					&& ent->client->saber[1].gloatAnim != -1 )
			{
				anim = ent->client->saber[1].gloatAnim;
			}
			else
			{
				switch ( ent->client->ps.fd.saberAnimLevel )
				{
				case SS_FAST:
				case SS_TAVION:
					anim = BOTH_VICTORY_FAST;
					break;
				case SS_MEDIUM:
					anim = BOTH_VICTORY_MEDIUM;
					break;
				case SS_STRONG:
				case SS_DESANN:
					if ( ent->client->ps.saberHolstered )
					{//turn on first
						G_Sound( ent, CHAN_WEAPON, ent->client->saber[0].soundOn );
					}
					ent->client->ps.saberHolstered = 0;
					anim = BOTH_VICTORY_STRONG;
					break;
				case SS_DUAL:
					if ( ent->client->ps.saberHolstered == 1 
						&& ent->client->saber[1].model 
						&& ent->client->saber[1].model[0] )
					{//turn on second saber
						G_Sound( ent, CHAN_WEAPON, ent->client->saber[1].soundOn );
					}
					else if ( ent->client->ps.saberHolstered == 2 )
					{//turn on first
						G_Sound( ent, CHAN_WEAPON, ent->client->saber[0].soundOn );
					}
					ent->client->ps.saberHolstered = 0;
					anim = BOTH_VICTORY_DUAL;
					break;
				case SS_STAFF:
					if ( ent->client->ps.saberHolstered )
					{//turn on first
						G_Sound( ent, CHAN_WEAPON, ent->client->saber[0].soundOn );
					}
					ent->client->ps.saberHolstered = 0;
					anim = BOTH_VICTORY_STAFF;
					break;
				}
			}
			break;
		}
	}

Link to comment
Share on other sites

Originally posted by razorace

While on the subject, has anyone else noticed bots wearing the wrong teams in team games?

 

Also, I have finally fixed the Hoth Bridge exploit if anyone is interested.

 

never noticed wrong team colors...

 

i would like that but siege doesnt work for rs or my basejka :/

Link to comment
Share on other sites

no, siege gives max cvars error...

 

actually base works for me now, for some reason all my rs cvars n **** were in base's config...

 

but i found a bug in cmd_kill_f with siege...

 

 

	if ( ent->client->sess.sessionTeam == TEAM_SPECTATOR ) {
	return;
}

shouldnt it be this, i was playing around and when i was specing when i could move, and pressed kill and i actually died again...

 

	if ( ent->client->sess.sessionTeam == TEAM_SPECTATOR || ent->client->tempSpectate > level.time ) {
	return;
}

Link to comment
Share on other sites

maybe but the cvar doesnt exist in the game code. i got it working using bot_nochat2.

 

in ai_util.c find the function BotDoChat

 

just below the gentity_t *cobject; line add:

 

	if (bot_nochat2.integer)
{
	return 0;
}

 

 

you will of course need to make the cvar in g_local.h and g_main.c.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...