Sir Robin wrote:I'm seeing another glitch effect on the 3d cursor. If it starts on a 2-sided wall that is attached to a moving floor or ceiling, then it glitches for the first few frames before going steady. For floors (platforms, elevators, etc) it happens if the floor is moving up or down. For ceilings (doors, crushing ceilings, etc) it only happens when the ceiling is moving up.
Also, it seems that the cursor is placed behind the geometry move operation. For example if the cursor is placed on a floor moving up or a ceiling moving down then the cursor goes inside the geometry. Same for if the cursor lands on a polyobject moving toward the cursor.
This might be due to the fact that during a game tick, the movement happens after the LineTrace coordinates have already been set, so you never see the cursor in the "correct" position for any given tick. I'm not sure if there is a way to account for this - you need to know if the movement is happening right now, and if it is, also which direction. It seems that sectors have a method called
PlaneMoving to check for the former, but so far I couldn't find any way to determine the movement speed and/or direction.
Sir Robin wrote:An issue I'm seeing now: If I get a hit on the floor I want to see what is the damage type and amount for standing on that floor. If I use HitSector.DamageType and HitSector.DamageAmount, those only work for the true floor of the sector. I need to find out how to get those values from the hit 3dfloor. The F3dfloor type does not have .DamageType or .DamageAmount variables on it.
F3DFloor has a field called
model which points to the control sector. Its floor should correspond to the 3D floor's ceiling, and vice-versa.
Sir Robin wrote:Still haven't found any for the Line or F3dFloor.
Look for zscript/mapdata.zs in gzdoom.pk3, it contains all the relevant declarations. Some of them even have helpful comments.