Commit graph

13787 commits

Author SHA1 Message Date
Christoph Oelckers
d513cbf789 - only activate lights if the light actor isn't dormant, and only create a new one if it doesn't already have one.
-
2019-04-27 13:30:21 +02:00
Christoph Oelckers
eebdd6c1bd - moved the menu.h include from oalsound.h to oalsound.cpp.
The menu is a very 'dirty' header, and forcing it to be pulled in with something entirely unrelated is not good - even though only two files include oalsound.h.

# Conflicts:
#	src/sound/i_sound.cpp
2019-04-27 13:30:06 +02:00
Christoph Oelckers
0e7b96681a - replaced DWORD_MAX with UINT_MAX globally.
This was the last remnant of ZDoom's old integer types.
2019-04-27 13:28:22 +02:00
Christoph Oelckers
4daa256e2f - fixed: RecreateAllAttachedLights must activate the lights it creates.
This also removes the gl_attachedlights CVAR because with the new management this doesn't really work anymore.

# Conflicts:
#	src/gl/system/gl_cvars.h
#	wadsrc/static/menudef.txt
2019-04-27 13:20:44 +02:00
Christoph Oelckers
309407ed61 - use map time, not hub time for map actions. 2019-04-27 13:18:08 +02:00
alexey.lysiuk
fa7d01896e - added virtual destructor to FDelayedCommand
src/c_dispatch.cpp:143:5: warning: delete called on 'FDelayedCommand' that is abstract but has non-virtual destructor [-Wdelete-non-virtual-dtor]
src/tarray.h:582:5: warning: delete called on 'FDelayedCommand' that is abstract but has non-virtual destructor [-Wdelete-non-virtual-dtor]
src/tarray.h:574:5: warning: delete called on 'FDelayedCommand' that is abstract but has non-virtual destructor [-Wdelete-non-virtual-dtor]
2019-04-27 13:18:06 +02:00
Christoph Oelckers
9cf9dc1f6b - took the delayed console command execution out of the thinker management.
Doing this intermingled with the thinkers is highly unsafe because there are absolutely no guarantees about order of execution.
Effectively it ran these commands right in the middle of the playsim which could cause all sorts of synchronization issues, because CCMDs are part of the UI, not the playsim.

- pass a const string to AddCommandString.

This function manipulated the input buffer, leading to all sorts of code contortions to make sure that the passed parameter is clean for that.
This function will now create a copy of the passed parameter which it can manipulate without complicating its calling code.

# Conflicts:
#	src/c_dispatch.cpp
2019-04-27 13:18:04 +02:00
Christoph Oelckers
5add7b1cb4 - fixed: When A_SpawnProjectile got fixed, this fix broke the old A_CustomMissile function because the added workaround was overlooked.
This now separates the code more clearly into the twp paths to make the differences easier to see and compare.
2019-04-27 13:09:09 +02:00
nashmuhandes
67513389e7 Missed "Abnt_C2" in the keybind name array. 2019-04-27 13:04:01 +02:00
Rachael Alexanderson
9acfd7a8c5 - add 'cl_blockcheats' - useful for people who use debugging keys, allows a user to consciously turn off cheats without affecting the server 2019-04-27 13:03:59 +02:00
Rachael Alexanderson
784de642d5 - fixed indentations caused by conflict resolution in cherry-picked commit d911fa99a1 2019-04-27 13:03:34 +02:00
alexey.lysiuk
cf3e677c54 - fixed linking of optimized targets
Undefined symbols for architecture x86_64:
  "AActor::Vec3Angle(double, TAngle<double>, double, bool)", referenced from:
      Net_DoCommand(int, unsigned char**, int) in d_net.cpp.o
2019-04-27 13:03:32 +02:00
Christoph Oelckers
ac68316527 - call level compatibility handlers for all levels and pass the map name as a second parameter.
This is for user-made handlers for which the checksum is rather useless both for deciding whether to call the handler and for identifying the map.

# Conflicts:
#	src/compatibility.cpp
#	wadsrc/static/zscript/level_compatibility.txt
2019-04-27 13:02:58 +02:00
nashmuhandes
9e1864b56b Punctuated the input strings in UpperCamelCase format. 2019-04-27 12:43:56 +02:00
Christoph Oelckers
fd772b6dab - fixed code emission for constant ZScript function arguments 2019-04-27 12:43:22 +02:00
Christoph Oelckers
1ab0be9d0c - fixed flicker light selection of light radius. 2019-04-27 12:43:20 +02:00
Christoph Oelckers
242f1458c8 - fixed Identifier resolving for static functions
This entered the code path which warned about ambiguous use of variables in action functions and as a result ran afoul of subsequent error checks.

Since ZScript has no global scope resolution operator, this needs to ignore all non-static class symbols and try to look up any of these as global identifiers.
2019-04-27 12:43:16 +02:00
Christoph Oelckers
81521c2def - removed incorrect assert.
This assert disallowed pointers to non GC'd objects, which on some occasions can happen and must be allowed.
2019-04-27 12:37:51 +02:00
nashmuhandes
fc3769bd7e Move the "time" string in saved game comment into the LANGUAGE lump.
# Conflicts:
#	src/g_game.cpp
2019-04-27 12:37:50 +02:00
drfrag
5c8b0a1e53 - Bumped ZScript version. 2019-04-27 12:35:41 +02:00
alexey.lysiuk
35867a1c29 - fixed 'overriding core lump' error
Wrong container was reported for overriding lump
2019-04-27 12:27:29 +02:00
Christoph Oelckers
0ed3ac740a - fixed: The rail attack only considered the puff's decal if it had ALWAYSPUFF set. 2019-04-27 12:16:34 +02:00
drfrag
e2d24d177f - fixed: application of fake contrast should never result in a light level of 0 unless the sector's own light level is 0.
(patch by Graf)
2019-04-27 12:16:10 +02:00
Christoph Oelckers
9c2a784ca1 - normalize the pitch in ACS's SetActorPitch.
Apparently some people have to pass positive numbers in here to get a negative pitch, e.g. 350.0 instead of -10.0...
This prevents clamping of such out-of-range values that would otherwise constitute valid pitches with the wraparound in place.
2019-04-27 12:10:42 +02:00
Christoph Oelckers
90b57ed808 - fixed: TVector3::Pitch() got the sign inverted.
This caused bad calculations with CMF_OFFSETPITCH. Note that to compensate for the fix, the SphericalCoords function had to have its own inversion of the value removed so that it calculates the same result as before.
2019-04-27 12:10:41 +02:00
alexey.lysiuk
583e1103a0 - workaround MSVC 2015 code generation issue, x64 only
With optimization turned on illegal instructions were generated for turbo CVAR handler function

https://forum.zdoom.org/viewtopic.php?t=63157
2019-04-27 12:09:36 +02:00
drfrag
ea688fc613 - recalculate the line deltas if a nodebuild is needed
One potential cause is moving around vertices in which case these do not match anymore. (patch by Graf)
2019-04-27 12:07:49 +02:00
Christoph Oelckers
e2c2837aa5 - allow assignment of line IDs through LevelCompatibility. 2019-04-27 11:38:41 +02:00
drfrag
a6d5e58886 - Partial port of "made some changes to how the compatibility code works" to allow exporting to ZScript. 2019-04-27 11:38:37 +02:00
Christoph Oelckers
ddf5e009e5 - fixed default alpha for sector colors
It has to be 0, not 255.
2019-04-26 18:18:11 +02:00
alexey.lysiuk
53a1fb5705 - fixed potentially missing event handlers
Event handlers linked list might skip an entry if its order was in a middle of existing handlers

https://forum.zdoom.org/viewtopic.php?t=63258
2019-04-26 18:14:58 +02:00
alexey.lysiuk
db0928be4d - fixed wrong self type in Array.Resize()
https://forum.zdoom.org/viewtopic.php?t=63275
2019-04-26 18:14:56 +02:00
alexey.lysiuk
37ce3e90de - relaxed caller type check for states modified by Dehacked
https://forum.zdoom.org/viewtopic.php?t=63178
2019-04-26 18:14:53 +02:00
alexey.lysiuk
a08bc271fa - fixed script line numbers after multi-line raw string literal
https://forum.zdoom.org/viewtopic.php?t=63210
2019-04-26 18:14:51 +02:00
alexey.lysiuk
a082a09ebe - unary minus operator propagates boolean operand to integer
https://forum.zdoom.org/viewtopic.php?t=63214
2019-04-26 18:14:49 +02:00
Christoph Oelckers
f90dadba44 - fixed some merging issues.
# Conflicts:
#	src/g_shared/a_decals.cpp
2019-04-26 18:12:32 +02:00
alexey.lysiuk
67c4317d54 - fixed compilation errors
src/scripting/decorate/thingdef_parse.cpp:80:11: error: no viable conversion from 'const FName' to 'FString'
src/scripting/zscript/zcc_compile.cpp:1359:26: error: use of undeclared identifier 'Name_globalfreeze'; did you mean 'NAME_globalfreeze'?

# Conflicts:
#	src/scripting/zscript/zcc_compile.cpp
2019-04-26 18:12:31 +02:00
Christoph Oelckers
d0c609eeee - ensure proper emission of deprecations.
For global variables this wasn't implemented.

# Conflicts:
#	src/namedef.h
#	src/scripting/backend/codegen.cpp
#	wadsrc/static/zscript/base.txt
2019-04-26 18:12:29 +02:00
Christoph Oelckers
120069890d - added the fix for BuiltinNew which I missed when cherry-picking. 2019-04-26 18:10:28 +02:00
Christoph Oelckers
21e4f0b817 - made OP_NEW a builtin function instead of an opcode.
The code was present 3 times due to the JIt, and this is not something that benefits from being a real opcode, even in the interpreted case.
2019-04-26 17:23:33 +02:00
Marrub
af27d579ac Make LevelLocals::ExecuteSpecial return int
# Conflicts:
#	wadsrc/static/zscript/base.txt
2019-04-26 17:20:44 +02:00
Marrub
73e174af4d Fix return value of native BuiltinCallLineSpecial 2019-04-26 17:20:42 +02:00
Chronos Ouroboros
e9ca5d6eff Fixed multidimensional array definitions. 2019-04-26 17:20:40 +02:00
alexey.lysiuk
494dc20088 - increased range of valid sound positions and velocities
https://forum.zdoom.org/viewtopic.php?t=61420
2019-04-26 17:20:37 +02:00
alexey.lysiuk
d8d290cd51 - fixed many compilation errors with GCC and Clang
# Conflicts:
#	src/dobjgc.h
2019-04-26 17:14:12 +02:00
Christoph Oelckers
d6b18e5792 - same for the ambient sound
# Conflicts:
#	src/s_advsound.cpp
2019-04-26 17:14:06 +02:00
Christoph Oelckers
381eb7a407 - removed dependency on global time in sound sequence code.
This can better use a countdown timer that doesn't depend on external behavior.
2019-04-26 17:14:04 +02:00
alexey.lysiuk
039b91859a - fixed key number assignment during parsing of locks
https://forum.zdoom.org/viewtopic.php?t=63171
2019-04-26 17:14:02 +02:00
Chronos Ouroboros
56be11bbe3 Added support for implicitly-sized initialized arrays.
Also fixed dynamic arrays not being cleared before initializing.
2019-04-26 17:13:59 +02:00
drfrag
e751476957 - Fixed compilation with MinGW-w64 but now the 64 bit executable crashes. 2019-04-26 17:03:29 +02:00