1015 Commits

Author SHA1 Message Date
Blixibon
70a13c3306
Merge pull request #333 from Wikot235/NewNoclipCommand
Added a new ConVar that allows trigger_changelevel to be triggered by MOVETYPE_NOCLIP
2025-01-10 08:22:04 -06:00
ALLEN-PC\acj30
468fa81f47 Expose VPhysicsInitNormal and VPhysicsDestroyObject to VScript 2025-01-10 08:13:46 -06:00
Blixibon
7220a6de28
Merge pull request #292 from arbabf/develop
Add random spawn type for env_headcrabcanister
2025-01-10 08:12:06 -06:00
ALLEN-PC\acj30
ad423d1d07 OnStartTipped output for npc_turret_floor 2025-01-10 08:06:37 -06:00
ALLEN-PC\acj30
a5c754dd00 Fixes and expansions for Lost/FoundEnemySound on NPCs 2025-01-10 08:05:59 -06:00
Blixibon
8ef090c963
Merge pull request #312 from Wikot235/Zombie_improved
Minor npc_zombie improvements
2025-01-09 13:15:45 -06:00
ALLEN-PC\acj30
aa31835f36 Change new CNPC_BaseZombie customization vars to match actual data types 2025-01-09 12:50:19 -06:00
Wikot235
0921f7409b Fixed miscellaneous things. 2025-01-08 21:22:06 +01:00
ALLEN-PC\acj30
ed476cbbe7 Increment Mapbase version to v7.3 2025-01-08 09:28:38 -06:00
Blixibon
a72779a0e7
Merge pull request #342 from celisej567/particlemgr-UB-fix
[FIX] Undefined behaviour on comparison of NaN and float at particlemgr.cpp
2025-01-08 09:26:28 -06:00
ALLEN-PC\acj30
a00c8234e4 Expose prop_door_rotating to VScript 2025-01-08 09:20:51 -06:00
Wikot235
99c94f058b Added more customizability 2025-01-06 16:54:54 +01:00
Wikot235
959af0b130 m_iMeleeReach now defaults to 55 2025-01-05 16:13:16 +01:00
Blixibon
7b15e43302
Merge pull request #324 from SirYodaJedi/master
Don't network info_null/func_null
2025-01-05 08:14:27 -06:00
Blixibon
de598346da
Merge pull request #332 from samisalreadytaken/fix-oob
Fix OOB access
2025-01-04 08:50:13 -06:00
Blixibon
a8d69e56e3
Merge pull request #264 from Petercov/mapbase-feature/vgui-screens
Outputs for vgui_screen
2025-01-04 08:48:37 -06:00
Blixibon
e0967dea69
Merge pull request #294 from azzyr/patch-1
Fix vertex blend swapping in Hammer for SDK_LightmappedGeneric
2025-01-04 08:44:59 -06:00
Blixibon
e3ca25a9fc
Merge pull request #308 from Wikot235/Fix-BlurFilterY-uses-width-instead-of-height
Fixed BlurFilterY uses width instead of height
2025-01-04 08:44:19 -06:00
Blixibon
7da95edde1
Merge pull request #315 from Wikot235/Fix-Flare-Issue
Fixed issue #314 (Env_flare crash)
2025-01-04 08:43:54 -06:00
Blixibon
b51c5c3f86
Merge pull request #322 from z33ky/small-mapbase-fixes
Small mapbase fixes
2025-01-04 08:43:02 -06:00
celisej567
93bec9d7c0 Update particlemgr.cpp 2025-01-03 04:28:09 +03:00
celisej567
138f51e791 Update particlemgr.cpp 2025-01-03 04:01:44 +03:00
celisej567
e5d30605d5 float NaN undefined behavour fix 2025-01-03 02:26:39 +03:00
Blixibon
0464bd7fd3
Merge pull request #309 from Blixibon/mapbase/feature/spotlight-ignore-solid
Spotlight "Ignore solid" keyvalue from MP branch
2025-01-02 08:37:00 -06:00
Blixibon
98816adacc
Merge pull request #301 from Blixibon/mapbase/feature/sky-camera-multi-saverestore-fix
Fix maps with multiple sky_cameras not using the correct sky_camera after loading a save
2025-01-02 08:36:03 -06:00
Blixibon
038c66ef58
Merge pull request #300 from Blixibon/mapbase/feature/chromatic-aberration-effect
Primitive chromatic aberration effect for env_screeneffect
2025-01-02 08:35:25 -06:00
ALLEN-PC\acj30
4efb50283d Fix "Fade Corpse" spawnflag on NPCs not applying to serverside ragdolls 2025-01-02 08:34:03 -06:00
ALLEN-PC\acj30
bdc34e4bad Fix autocubemap crashing when not in a level 2025-01-02 08:33:22 -06:00
Blixibon
da44d97951
Merge pull request #297 from Blixibon/mapbase/feature/useable-ragdolls
Add capability to +USE serverside ragdolls and toggle cleanup of individual ragdolls
2025-01-02 08:31:09 -06:00
ALLEN-PC\acj30
b59214ca72 Fix dynamic interactions using "their_" keyvalues always assuming separate sequence names 2025-01-02 08:29:48 -06:00
ALLEN-PC\acj30
e954f00f79 Fix antlions using wrong angles for dynamic interactions 2025-01-02 08:28:38 -06:00
ALLEN-PC\acj30
f5db760a66 Add raw scene file support to GetSceneDuration() 2025-01-02 08:28:06 -06:00
ALLEN-PC\acj30
b19f329d5f Fix ai_dynint_always_enabled bypassing misc. criteria 2025-01-02 08:27:21 -06:00
Blixibon
72bd5fe948
Merge pull request #266 from rlenhub/develop
Implement "OnPhysGunPull" output in CPhysicsProp
2025-01-02 08:26:35 -06:00
Wikot235
47aa8ac3f4 Update triggers.cpp 2024-11-25 22:16:57 +01:00
samisalreadytaken
7ebb26c996 Fix OOB access on CBaseCombatCharacter::m_hMyWeapons 2024-11-22 16:38:36 +03:00
samisalreadytaken
3aad0f5245 Cleanup SquirrelVM saverestore 2024-11-21 17:24:48 +03:00
Alexander 'z33ky' Hirsch
6297d2b552 Fix ScriptHook_t initialization order
When a ScriptClassDesc_t for is initialized (SCRIPTDESC), it recursively
invokes its parents initializers in order to obtain their pHelper
member.
Initialization is only done once, so repeated initialization is skipped.
Initialization includes assignment of a vector of ScriptHook_t's
(DEFINE_SCRIPTFUNC/BEGIN_SCRIPTHOOK), which must be initialized
beforehand.
Both of these use (static) globals; Within a translation unit,
initialization order is defined to be the same as the order of
declaration. So within a translation unit we must define all
ScriptHook_t's before the ScriptClassDesc_t using them.
A problem occurs with the parent initialization though, since there is
no defined order between translation units, meaning initialization of a
ScriptClassDesc_t can happen before its ScriptHook_t's, despite being
the correct order within its translation unit.

On MSVC it seems this issue is benign. On GCC/Linux however the
initialization of a ScriptHook_t essentially cleared whatever happened
during the initialization of the ScriptClassDesc_t, meaning many hooks
simply didn't work.

This situation is remedied by delaying the initialization of the
ScriptClassDesc_t's ScriptHook_t vector to only when the constructor of
it is invoked from its translation unit. This is accomplished simply by
adding a boolean parameter to the function (GetScriptDesc()) that is
true in the global constructor invocation, and false by default
(including when doing parent ScriptClassDesc_t initialization).
When false, a valid ScriptClassDesc_t pointer is still returned, which
is all that is needed for the initialization of the child
ScriptClassDesc_t. The value of the returned pointer is a fixed memory
location, and does not change due to the delayed initialization.
The script-helper must be initialized eagerly though, for the search of
a base-class helper. This also changes the SCRIPTDESC slightly to
accommodate the eager initialization of helper instance pointer.

Fixes #244.
2024-11-20 23:02:00 +01:00
Alexander 'z33ky' Hirsch
7d78384b26 Fix scriptanimevent_t::SetOption()
The string argument refers to memory managed by the Squirrel VM. It has
no guarantee that the string will continue to exist after the hook, from
which this can be called, has finished executing.
To fix this, allocate memory to copy the string into and manage it as
needed.
2024-11-19 13:26:59 +01:00
Alexander 'z33ky' Hirsch
8e8bdfc371 Optimize void return in squirrel function call stub 2024-11-19 13:26:58 +01:00
Alexander 'z33ky' Hirsch
1ecaa44c49 Release ScriptVariant_t memory in all paths of squirrel function stubs 2024-11-19 13:26:56 +01:00
Alexander 'z33ky' Hirsch
c0e12a2f58 Add type check for script helper assignments from ScriptVariant_t 2024-11-19 13:26:23 +01:00
Alexander 'z33ky' Hirsch
cbb60e1afd Remove VScript Squrrel arithmetic operator helper
They were broken, and only add for Quaternions was implemented, for
which there is a working QuaternionAdd() script function instead.
Fixing it seems like unnecessary work.
2024-11-19 13:26:22 +01:00
Alexander 'z33ky' Hirsch
a2e43a567f Fix (potential?) memory leaks from getVariant() (SquirrelVM)
Free values before assignment.
2024-11-19 13:26:22 +01:00
Alexander 'z33ky' Hirsch
fe82da8f1b Remove unused generic ScriptVariant_t::{Get,AssignTo}()
They wouldn't even work.
2024-11-19 13:26:22 +01:00
Alexander 'z33ky' Hirsch
99858e63f7 Optimize squirrel function_stub() Vector/QAngle return value
Instead of temporary allocating dynamic memory, which subsequently is
copied into another dynamically allocated piece of memory, provide a
temporary buffer on the stack.
The script value inserted into the VM still needs to allocate
dynamically though...

A few sites are adapted to not create a ScriptVariant_t from a temporary
Vector to avoid dynamic allocation there too.

cf. mapbase-source/source-sdk-2013#321
2024-11-19 13:26:19 +01:00
Alexander 'z33ky' Hirsch
879b9e8d25 Fix dubious ScriptVariant_t Free()'s
When assigning a null value in getVariant(), make sure a previous
SV_FREE is not carried over.

In SqurrelVM::ReleaseValue(), make sure SV_FREE is not kept after
Free()ing a value.
2024-11-15 15:38:09 +01:00
Alexander 'z33ky' Hirsch
80f19601ee "Fix" ScriptVariant_t::Free()
Type FIELD_HSCRIPT is removed, it never sets SV_FREE.

All dynamic memory is now free`d via free(). For strdup(), this would be
the conformant way in standard C++. It matters not in Source, since both
use the same global allocator of the engine, but it is tidier.
Vector and QAngle are now allocated via malloc() instead of new to
provide symmetry.
2024-11-15 15:38:08 +01:00
Alexander 'z33ky' Hirsch
696036219e Prevent signed overflow (UB) in SquirrelVM::GenerateUniqueKey() 2024-11-13 00:25:51 +01:00
Yui
337b58eb3c
Don't network info_null
Reduces potential for entity limit crashes, as it still exists for the first tick.
2024-09-09 10:33:07 -04:00