View Single Post
Old 09-04-2006, 10:02 PM   #114
Impressive, Terran!
razorace's Avatar
Join Date: May 2002
Posts: 9,198
Here's a really old bug fix that CerburuS told me about ages ago. However, I never actually tried it so your mileage may vary. I'll give this a shot when I have time as well.

Originally Posted by CerburuS
just wanted to let you know that there's a bug in basejka which disables Areaportals in Siege permanently if that Areaportal is "open" when the round is being restarted (i.e. the Areaportal will not work at all in the next round, causing bad FPS for the players).

In basejka Siege it's obviously not as much of an issue as it is in MBII since there's only one round restart per map at max (opposed to 20+ in MBII). Thought you might be interested nonetheless...

I've written a relatively simple fix for this problems - could forward to you if you want. It'd need a small modification for basejka though since I'm using a MBII-specific value to determine whether the server is currently in round transition.

Well, area portals should be used quite frequently in Siege maps - I imagine that siege_desert for example uses quite a few. The only one I know for sure is located at the Command Center doors at siege_hoth. They should be easy to detect via /r_showtris 1 though.

		//fix for self-deactivating areaportals in Siege
		if ( ent->s.eType == ET_MOVER && g_gametype.integer == GT_SIEGE && level.MBIntermission)
			if ( !Q_stricmp("func_door", ent->classname) && ent->moverState != MOVER_POS1 )
				SetMoverState( ent, MOVER_POS1, level.time );
				if ( ent->teammaster == ent || !ent->teammaster ) 
					trap_AdjustAreaPortalState( ent, qfalse );

				//stop the looping sound
				ent->s.loopSound = 0;
				ent->s.loopIsSoundset = qfalse;			}
This is the code I inserted in g_main.c (around line 4169 in the MB version). I'd just send you the file but since my comp just got fried 2 hours ago, this would take a while Basically you should be able to insert it anywhere in the G_RunFrame function.

Basically it closes any door that is not closed (i.e. opening, closing, or open) and activates the areaportal again. According to our beta testers, it works pretty well so far. If you can think of a better way to do this though, just let me know

The only thing that will need adapting is the level.MBintermission value I'm using since that one's MB specific.

Hope it's at least of some help.
EDIT: Ensiform has come up with code to fix this bug for basejka. Look down in this thread for it.

---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder

Last edited by razorace; 09-06-2006 at 03:50 PM.
razorace is offline   you may: quote & reply,