PadWorld-Entertainment / worldofpadman

World of PADMAN game repository
https://worldofpadman.net
Other
39 stars 9 forks source link

The icon will be hidden only for one of all health stations on a map when the player is near it #189

Closed kai-li-wop closed 1 year ago

kai-li-wop commented 1 year ago

The icon should not be drawn if the health station is very close and visible to the player. I tried to implement this with 96e4081, which uses existing code from the balloon boxes. The code works so far, but only for one of all health stations in a map. I can't figure out why, since all stations should be passed through due to the loop that calls CG_DrawHealthstationIcon.

mgerhardy commented 1 year ago

the trace is never 1 - but 0.997

kai-li-wop commented 1 year ago

I did more tests and in some maps the icon disappears only at one station, in other maps it does not disappear at any of the stations.

mgerhardy commented 1 year ago

the origin of the healthstations are sometimes slightly placed into the ground surface - we should apply an offset to the z axis about half the height of the model. Also it looks like the distance of 250 is not enough. You almost have to stand in the healthstation to disable it.

kai-li-wop commented 1 year ago

Hmm, it is the same distance like with the balloon boxes (where i took the code from) and it works very good with one of the health stations in PadGarden (next to the barbecue).

kai-li-wop commented 1 year ago

The balloon model does not seem to be affected by these problems. In PadCastle (content of the PadPack addon) there is definitely a balloon box that is below floor level (one or a few units, you can at least see the floor of the room inside the box) and the icon is still displayed. The origin of the balloon box model is definitely at the base of the model. What does the balloon box icon code do differently?

kai-li-wop commented 1 year ago

Should work for all health stations like expected. When the player is in close range, the icon should disappear.

3aTmE commented 1 year ago

Just tried it, works flawlessly!

On all health stations the icon will disappear proper when getting close to it.