Zandronum Chat on our Discord Server Get the latest version: 3.1
Source Code

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002193Zandronum[All Projects] Suggestionpublic2015-04-17 02:252024-01-29 15:01
ReporterStrikerMan780 
Assigned To 
PriorityhighSeveritymajorReproducibilityN/A
StatusresolvedResolutionfixed 
PlatformMicrosoftOSWindowsOS VersionXP/Vista/7
Product Version 
Target VersionFixed in Version 
Summary0002193: Backport CrimsonDusk's GetSectorFloorZ/CeilingZ changes for 2.1
DescriptionThere was a change to GetSectorFloorZ/GetSectorCeilingZ that allowed you to pass 0 as an argument to represent "Any" sector. This is necessary for a dynamic weather system I have in the works, and was hoping to be able to use this feature in Zandronum 2.1.

'http://zdoom.org/Changelog/d7a24357/files [^]'
Additional InformationHere's a sample script that is using this, to spawn raindrops at the correct Z coordinate of the sector it's spawning in. This works in GZDoom and ZDoom, but not Zan.

script 910 ENTER CLIENTSIDE
{
    if(ConsolePlayerNumber() != PlayerNumber())
    {
        Terminate;
    }
    
    while(1)
    {
        int WeatherType = GetCVar("smmp_weathertype");
        
        if(WeatherType > 0)
        {
            int Density = GetCVar("smmp_weatherdensity");
            
            for(int i = 0; i < Density; i++)
            {
                int x = GetActorX(0) + random(-512.0, 512.0);
                int y = GetActorY(0) + random(-512.0, 512.0);
                int z = GetSectorCeilingZ (0, x >> 16, y >> 16) - random(1.0, 8.0);
                 
                SpawnForced(RainActors[WeatherType-1], x, y, z);
            }
        }
        
        delay(1);
    }
}
Attached Files

- Relationships

-  Notes
User avatar (0012123)
Ivan (reporter)
2015-04-17 15:42

What kind of an "any" sector? Doesn't 0 normally represent the current actor's sector?
User avatar (0012124)
ibm5155 (reporter)
2015-04-17 16:03
edited on: 2015-04-17 16:09

On my weather system, that was the biggest problem for me, and still is, it never worked fine, it's bad I can't get propertly a celing or floor position if the sector to be tested '-'.

Because of that I was forced to set manually all the ceiling sizes so my rainfall could at least work '-'.

Also, it would be nice to have a GetHighestCeiling function, since GetSectorCeilingZ woudn't work at all on sectors with 3D floors on it '-'

If you guys want, I have made a test cenary for testing this rainfall simulation in most cases (slopes, 3D floors, 3D slopes, 3D floors over 3D floors over slopes...)

User avatar (0012125)
StrikerMan780 (reporter)
2015-04-17 17:30

"What kind of an "any" sector? Doesn't 0 normally represent the current actor's sector?"

No. It's supposed to return the Height of any sector found at the specified X/Y Coordinates.

You're thinking of Get*ACTOR*FloorZ/CeilingZ .
User avatar (0023031)
Ru5tK1ng (updater)
2024-01-29 15:01

This was added in 3.0

Issue Community Support
This issue is already marked as resolved.
If you feel that is not the case, please reopen it and explain why.
Supporters: ibm5155 StrikerMan780
Opponents: No one explicitly opposes this issue yet.

- Issue History
Date Modified Username Field Change
2015-04-17 02:25 StrikerMan780 New Issue
2015-04-17 15:42 Ivan Note Added: 0012123
2015-04-17 16:03 ibm5155 Note Added: 0012124
2015-04-17 16:09 ibm5155 Note Edited: 0012124 View Revisions
2015-04-17 17:30 StrikerMan780 Note Added: 0012125
2024-01-29 15:01 Ru5tK1ng Note Added: 0023031
2024-01-29 15:01 Ru5tK1ng Status new => resolved
2024-01-29 15:01 Ru5tK1ng Resolution open => fixed






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2024 MantisBT Team
Powered by Mantis Bugtracker