With cordite in the air, splintered steel, shell casings and powder burns, there’s only one explanation...
WQ3 pre B2.1 archive. Links may not work.

[BUG] Gatling fall-through on br_farm

Postby torhu » Thu Sep 08, 2005 3:03 pm

breli wrote:If you want to deploy the gat on a patch surface of the game world you "fall" through the surface. That has been described as the br_farm bug in the ICI forum. Thus, you stand "under" the surface, nobody can see or shoot you but you can see and shoot all the others Wink. There must be a flaw in the deploying code. Probably the code can't figure out a position for the gat since the surface is round.

Steps to reproduce the bug:
- start br_farm and get a gat
- try to deploy the gat on the round "hill" in the backyard close to the stack of wood
- if it says "ground is not flat enough" move a little upward
- deploy the gat
In game: =SG=monSter
Monster Browser
User avatar
torhu
SG Team
 
Posts: 1125
Joined: Thu Jan 06, 2005 8:12 pm
Location: Norway



Postby torhu » Tue Sep 13, 2005 6:02 am

I see the problem, trying to fix. :)
In game: =SG=monSter
Monster Browser
User avatar
torhu
SG Team
 
Posts: 1125
Joined: Thu Jan 06, 2005 8:12 pm
Location: Norway



Postby torhu » Wed Sep 14, 2005 3:45 pm

When you drop a weapon on the mound in question, it seems that the weapon falls through the surface, so you can't see it anymore. But when you walk over the spot where you dropped it, you still pick it up. So it seems the weapon is laying right below the surface. But when you fall through yourself, you fall all the way down to the level of the surrounding flat ground.

Can any of the mappers explain to me why this mound seems to have such weird properties? And what's this talk about 'patch surfaces', is the whole mound a patch surface? And what implications will that have for its interaction with the player and weapons?

Maybe I could prevent the gatling from being deployed on that kind of surface, if you can tell from inside the code which kind of surface it is.

And when you drop through because of using the gatling, the game seems to still think you're standing at the gatling, because you still have the gatling stance.
In game: =SG=monSter
Monster Browser
User avatar
torhu
SG Team
 
Posts: 1125
Joined: Thu Jan 06, 2005 8:12 pm
Location: Norway



Postby Breli » Wed Sep 14, 2005 4:10 pm

Hi torhu,

I don't have the map file of br_farm but AFAIK Red has it. The mounds look like patch surfaces. I am pretty sure that they are not constructed by normal brushes.

Concerning patch surfaces (I am a newbie but I try anyway ;)): In contrast to normal brushes, patches aren't really convex volumes. They are simply planes rather than three-dimensional objects. The patch is infinitesimal "thin". Every "round" surface is made of patches. They are rarely used due to performance issues (it needs a lot of triangles to resemble a sphere, even with z-compression). Although, a sphere is a three-dimensional object, its "hull" isn't from the engine's point of view. AFAIK, the mound in question is the top of a large sphere. In general, patches are handled differently by the engine (for instance they can't be structural).

Thus, I guess the following: if an object is "standing" on a patch surface (which is round), the engine has problems to identify the "ground", because, theoretically, there isn't any. If a player deploys a gat and the player is repositioned just one "pixel" for whatever reason he can not stand on the surface anymore and falls right through it.

[EDIT]
This whole explanation is not really accurate since a sphere is a convex volume of course :D. It is very difficult to explain. Anyway, I am pretty sure that the problem is caused by surface properties of patches. The "hull" of a patch is "too thin". Every surface made of normal brushes can be described by triangles (which may be very small) and their normal. In case of a patch sphere the normal for each coordinate on the sphere's surface is different (which is not the case if the sphere is "blocky" and made of normal brushes). I better stop all this babbling before I confuse everybody :D
[\EDIT]

[EDIT2]
The extension of the explanation isn't really any better. But I don't give up. SPoG's tutorial http://www.planetquake.com/spog/stuff/technical.html can probably help. A patch surface is stored differently than a normal brush. It is stored as a matrix of coordinates. Additionally, T-junctions are not fixed automatically by the BSP compile stage. Probably the engine is not able to calculate a correct position from the matrix of coordinates.
[\EDIT2]

I don't whether this will help you or whether this is correct or not ;). I can create a small test map tonight when I am back home if you want me to.

I think using patch surfaces is not a good idea anyway and we will not do that again. It is probably easier to fix the map than to "code your way out of it" ....

cheers

breli
Last edited by Breli on Wed Sep 14, 2005 6:29 pm, edited 3 times in total.
User avatar
Breli
SG Team
 
Posts: 906
Joined: Mon Jul 18, 2005 10:08 am
Location: Germany



Postby Breli » Wed Sep 14, 2005 6:15 pm

An addition to my previous post:

torhu wrote:When you drop a weapon on the mound in question, it seems that the weapon falls through the surface, so you can't see it anymore. But when you walk over the spot where you dropped it, you still pick it up. So it seems the weapon is laying right below the surface. But when you fall through yourself, you fall all the way down to the level of the surrounding flat ground.


You'll notice the effect torhu described only when you have "Simple Weapons" disabled. Whether an entity remains on the surface or not depends on the steepness of the slope. If you throw away a weapon at the base of the mound it will come to rest "under" the surface. An "entity-brush" is actually much larger than it appears in the game. It is about half the size of a "player-entity". That's why you don't have to walk directly over an entity in order to pick it up.

Torhu: do you know how the engine determines the coordinates at which dropped/deployed entities come to rest? If, say, a dropped weapon comes to rest if half to the entites brush is sunken in the ground, it would explain the effect on different steepness "degrees" of the mound. Furthermore, is a player "moved" vertically/ horizontally if he deploys the gat?

Didn't I say, that I better stop all this babbling about stuff I don't understand? :D Yes, I did.

cheers

breli
User avatar
Breli
SG Team
 
Posts: 906
Joined: Mon Jul 18, 2005 10:08 am
Location: Germany



Postby torhu » Wed Sep 14, 2005 8:52 pm

So these patches are quite possibly not supposed to be used like that in the game? If I am to check for patch surfaces in the code, I think I need to know what surface and content properties they have, so I can seperate them from the brushes. I haven't figured that out so far.

As for the dropped guns going through too, I could make their 'item box' smaller, but that would change the way they behave in all situations. I'm not sure this is really the problem either, since they seem to look natural lying on other surfaces.

I think this physics stuff is mostly handled in the engine. So it might be better if you could change the map, if this is the only map that has got this problem. Then again, I'm partially just guessing all of this, so if you want me to look further into it, I can ask for some tips at the quake3world forum. ;)
In game: =SG=monSter
Monster Browser
User avatar
torhu
SG Team
 
Posts: 1125
Joined: Thu Jan 06, 2005 8:12 pm
Location: Norway



Postby Breli » Wed Sep 14, 2005 10:49 pm

Hi torhu,

I tested this a bit today with a testmap I made. It is definitely a problem with patch brushes respectively curves. I designed similar mounds and got the same result (I always woundered how these mounds have been designed in the first place and now I know :D).

PM me if you want the testmap ...

Now, what to do?

torhu wrote:So these patches are quite possibly not supposed to be used like that in the game? If I am to check for patch surfaces in the code, I think I need to know what surface and content properties they have, so I can seperate them from the brushes. I haven't figured that out so far.


You can't really say that they are not supposed to be used as "normal" surfaces. After all, they work perfectly in all other "disciplines". Additionally, it wouldn't make sense IMHO to prevent that the gat is used on such a surface. From a player's perspective, a patch/curve isn't different from any other brush.

torhu wrote:As for the dropped guns going through too, I could make their 'item box' smaller, but that would change the way they behave in all situations. I'm not sure this is really the problem either, since they seem to look natural lying on other surfaces.


We definitely shouldn't mess around with the entity boxes. That'll surely cause more troubles ... And that's not really a problem anyway. I guess we can just ignore that.

I think this physics stuff is mostly handled in the engine. So it might be better if you could change the map, if this is the only map that has got this problem. Then again, I'm partially just guessing all of this, so if you want me to look further into it, I can ask for some tips at the quake3world forum. ;)


The easiest solution will be to change the map if we have the map file. Additionally, we shouldn't use curves in future maps as ground surfaces. Still, these are not "weird" or "wrong" brushes. There is a flaw in the deploying code. I noticed that I don't fall through the surface if I stand perfectly still. You fall through if you move. So the problem may be "moving with a deployed gat". "Normal" movements work just fine.

I don't know what to do. It's up to you whether you want to tackle this or not. I am sure there are a lot of other bugs that are more worthy to be tackled by your coding skills :lol: It's not a big problem IMHO. It's just not "nice" ;). I am sure that Red and L3th4l have something to say about this. After all, they know much more about mapping than I do ...

cheers

breli
User avatar
Breli
SG Team
 
Posts: 906
Joined: Mon Jul 18, 2005 10:08 am
Location: Germany



Postby ReD NeCKersoN » Thu Sep 15, 2005 2:17 am

I would imagine it would be much easier to alter the map than to try to fix this with coding. We could simply place some caulk brushes under the patches or remove the patches entirely and replace them with standard brushes. I think I'd prefer to keep the map as true to the original as possible though. Please see the Smokin' Guns section for the original map file (Breli) if you'd like to have a look. :wink: Once you see my post there you'll understand why I ask for your help in this matter. (It's really good news!)
User avatar
ReD NeCKersoN
SG Team
 
Posts: 3245
Joined: Wed Mar 27, 2002 6:22 am
Location: VA, USA




Return to WQ3 Beta 2.1 Testing

Show Sidebar
Show Sidebar

User Control Panel

cron