Fixing the `bug` in E4M8 (The Nameless City)
Moderator: InsideQC Admins
12 posts
• Page 1 of 1
Fixing the `bug` in E4M8 (The Nameless City)
right at the beginning of the nameless city if you stand on the top of the teleporter, it results in a program error....
how to best go about fixing this using QuakeC?
how to best go about fixing this using QuakeC?
-

dayfive - Posts: 77
- Joined: Fri Nov 10, 2006 9:48 pm
At the beginning of teleport_touch() in triggers.qc just after this:
put this:
- Code: Select all
local entity t;
local vector org;
put this:
- Code: Select all
t = find( world, targetname, self.target );
if( !t )
{
if( mapname == "e4m8" )
{
return;
}
objerror( "couldn't find target" );
}
-

DieparBaby - Posts: 44
- Joined: Tue Dec 05, 2006 3:27 pm
- Location: London, Ontario, Canada, eh
DieparBaby wrote:At the beginning of teleport_touch() in triggers.qc just after this:
- Code: Select all
local entity t;
local vector org;
put this:
- Code: Select all
t = find( world, targetname, self.target );
if( !t )
{
if( mapname == "e4m8" )
{
return;
}
objerror( "couldn't find target" );
}
thanks!
-

dayfive - Posts: 77
- Joined: Fri Nov 10, 2006 9:48 pm
That's good, but unfortunatly, it'll have an unfortunate side effect of not removing the trigger. In short, you'll get a constantly repeating teleport flash / fog effect whenever you're touching it.
It's probably better to put:
This will cause the trigger_teleport to be removed upon spawning when the level loads.
And no, I did not look at the map sources to determine the target designation. You can use this to good effect to hack and change a lot of entities and conditions for activating said entities by learning to use the data they contain to identify them. (One very good example is patrick martin's dragons! patch.)
It's probably better to put:
- Code: Select all
if(mapname == "e4m8" && self.target == "t273")
{
remove(self);
return;
}
This will cause the trigger_teleport to be removed upon spawning when the level loads.
And no, I did not look at the map sources to determine the target designation. You can use this to good effect to hack and change a lot of entities and conditions for activating said entities by learning to use the data they contain to identify them. (One very good example is patrick martin's dragons! patch.)
-

Dr. Shadowborg - InsideQC Staff
- Posts: 1110
- Joined: Sat Oct 16, 2004 3:34 pm
Actually if you put that code right at the beginning of the touch function like I indicated
you won't get the teleport flash. I tested it in game. The code will only
return if the teleport doesn't have a target so other valid teleports on e4m8 are fine.
you won't get the teleport flash. I tested it in game. The code will only
return if the teleport doesn't have a target so other valid teleports on e4m8 are fine.
-

DieparBaby - Posts: 44
- Joined: Tue Dec 05, 2006 3:27 pm
- Location: London, Ontario, Canada, eh
DieparBaby wrote:Actually if you put that code right at the beginning of the touch function like I indicated
you won't get the teleport flash. I tested it in game. The code will only
return if the teleport doesn't have a target so other valid teleports on e4m8 are fine.
Then you'll be calling a horribly ineffecient find function twice, unless you take out the one that's called later on. =P
Incidentally, I forgot to mention that the code bit I posted should be placed at the beginning of the trigger_teleport function.
-

Dr. Shadowborg - InsideQC Staff
- Posts: 1110
- Joined: Sat Oct 16, 2004 3:34 pm
I like the idea of what you're trying to do, but it's far easier to remove the entity in question. The hardest part is just to work out how to uniquely identify the entity you want to change/remove, and for that, a combination of looking at the map sources, looking at a list of just the entities in the map (do sv_saveentfile from within DarkPlaces), or creating a progs.dat that helps you to identify things from a players-eye view will help you to determine what needs to be changed.
-

Lardarse - Posts: 266
- Joined: Sat Nov 05, 2005 1:58 pm
- Location: Bristol, UK
to be perfectly honest, i kind of like the repeating teleport fog/flash whatever.... so the first solution is fairly nice imho
however, this solution has implications reaching far beyond this small problem; which i will most definitely note for future reference
also, i couldn't find any mention of the e4m8 bug
on at least the following URLs
http://www.inside3d.com/qip/q1/bugs.htm
http://www.inside3d.com/qip/q1/qcfix.htm
http://www.inside3d.com/qip/q1/qfix.htm
where is this specific issue talked about on QIP?
however, this solution has implications reaching far beyond this small problem; which i will most definitely note for future reference
Dr. Shadowborg wrote:
- Code: Select all
if(mapname == "e4m8" && self.target == "t273")
{
remove(self);
return;
}
also, i couldn't find any mention of the e4m8 bug
FrikaC wrote:You could just use the fixes found on QIP
on at least the following URLs
http://www.inside3d.com/qip/q1/bugs.htm
http://www.inside3d.com/qip/q1/qcfix.htm
http://www.inside3d.com/qip/q1/qfix.htm
where is this specific issue talked about on QIP?
-

dayfive - Posts: 77
- Joined: Fri Nov 10, 2006 9:48 pm
That's because all of those links go to code related bugs or fixes, it's a map error and is thus found on the Map bugs section:
http://www.inside3d.com/qip/q1/bugsmap.htm#Maps
The text of the problem is this:
"Quake crashes on E4M5, when a player grapples, noclips or rocket/grenade-jumps to the top of the secret exit.
Reported by Robert "Frog" Field
A similar error occurs in the START map under the exit to the end level (by Robert Field too) and at top of the start gate in E4M8 (by Max Bartlett)"
It links to this QuakeC fix as well as patches for the actual maps.
http://www.inside3d.com/qip/q1/bugsmap.htm#Maps
The text of the problem is this:
"Quake crashes on E4M5, when a player grapples, noclips or rocket/grenade-jumps to the top of the secret exit.
Reported by Robert "Frog" Field
A similar error occurs in the START map under the exit to the end level (by Robert Field too) and at top of the start gate in E4M8 (by Max Bartlett)"
It links to this QuakeC fix as well as patches for the actual maps.
- FrikaC
- Site Admin
- Posts: 1026
- Joined: Fri Oct 08, 2004 11:19 pm
FrikaC wrote:That's because all of those links go to code related bugs or fixes, it's a map error and is thus found on the Map bugs section:
http://www.inside3d.com/qip/q1/bugsmap.htm#Maps
The text of the problem is this:
"Quake crashes on E4M5, when a player grapples, noclips or rocket/grenade-jumps to the top of the secret exit.
Reported by Robert "Frog" Field
A similar error occurs in the START map under the exit to the end level (by Robert Field too) and at top of the start gate in E4M8 (by Max Bartlett)"
It links to this QuakeC fix as well as patches for the actual maps.
oh!! I see now.... Thanks for pointing this out!
it's good to know about those others as well! In those cases it might be more desirable to use the if(mapname == "whatever" && self.target == "t420") remove(self); fix
thanks for describing it in detail
-

dayfive - Posts: 77
- Joined: Fri Nov 10, 2006 9:48 pm
12 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest