Commit Graph

106 Commits

Author SHA1 Message Date
Alexander 'z33ky' Hirsch
9d0f5197bd Fix gcc 9/10 & mapbase build errors 2020-06-19 18:02:06 +02:00
Alexander 'z33ky' Hirsch
4d45c32be9 Switch to malloc() for C_SceneEntity::LoadScene()
It used new char[] before, but it seems when the buffer is allocated
using filesystem->ReadFileEx() we should free() the buffer, not delete[]
it. CUtlBuffer also free()s the buffer, so malloc() should be the saner
choice here.
2020-06-14 11:29:54 +02:00
Alexander 'z33ky' Hirsch
77fada1ca2 Fix gcc 8.2 build errors 2020-06-14 11:29:54 +02:00
Alexander 'z33ky' Hirsch
2c60bd368d Get rid of some unnecessary temporary buffers 2020-06-14 11:15:58 +02:00
Alexander 'z33ky' Hirsch
d72d817eac Fix #includes casing
This is important for case-sensitive filesystems/operating systems (i.e.
Linux).
2020-06-14 11:14:18 +02:00
Alexander 'z33ky' Hirsch
48fb4ab56c Fix crash on startup
This crashes on Linux as pKeyValuesData is NULL when deleteThis() is
invoked. This likely is caused by another issue, but fixing this here
seems good regardless.
2020-06-14 11:14:18 +02:00
Blixibon
5b2547a6ff Merge branch 'master' of https://github.com/mapbase-source/source-sdk-2013 2020-06-13 16:06:41 -05:00
Blixibon
a7e23e46e9 Mapbase v4.0
- Fixed SDK_Refract and SDK_Water not using new cubemap method
- Added missing .inc files for SDK_ShatteredGlass
- Updated gitignore
- Fixed parallax corrected cubemaps sometimes causing VBSP to crash
- Added spawnflag to npc_headcrab which can prevent a headcrab from drowning
- Added spawnflag to npc_headcrab which can prevent a headcrab from instantly dying to a melee weapon
2020-06-13 20:45:37 +00:00
Blixibon
ea0c830a62 Added VScript utility functions + loosened VScript EntFire(ByHandle) restrictions 2020-06-13 12:44:40 -05:00
Blixibon
03632df565 Fixed matrix3x4_t constructor not working before instantiated by other means 2020-06-12 11:12:41 -05:00
Blixibon
0094d707b9 Created a limited clientside CScriptEntityIterator 2020-06-11 23:48:59 -05:00
Blixibon
7d2c6315b5 Added more VScript functions for player classes 2020-06-11 23:47:28 -05:00
Blixibon
66a44d0739 Exposed matrix3x4_t and FireBulletsInfo_t to VScript, expanded available math functions 2020-06-11 23:30:22 -05:00
James Mitchell
07eb28ffe8 Fixing issue with restored vscript classes that are not registered being unable to be instantiated 2020-06-09 19:51:20 +10:00
James Mitchell
859447ee69 Hiding squirrel compiler warnings when building vscript (fixes #14) 2020-06-07 14:47:49 +10:00
Blixibon
14efc92e33 Fixed VScript material proxy retaining VM handles after level unload 2020-05-31 20:58:50 -05:00
Blixibon
82b0460d8f Merge branch 'feature/vscript' of https://github.com/mapbase-source/source-sdk-2013 into feature/vscript 2020-05-31 08:57:35 -05:00
Blixibon
4225e9d570 Minor VScript VPC fixes + misc. adjustments 2020-05-31 08:57:19 -05:00
James Mitchell
cd31f9db15 Fixing repeated save/restore where regexp would fail to serialize 2020-05-31 17:06:24 +10:00
James Mitchell
1ebb257648 Changing vscript convars class to CConvars to avoid duplicating the variable 2020-05-31 17:05:30 +10:00
James Mitchell
8316cf05ec Enabling vscript_client.nut and vscript_server.nut (fixes issue with doc aliases) 2020-05-31 15:39:17 +10:00
James Mitchell
76db66f70a Adding script_help support 2020-05-31 15:37:54 +10:00
James Mitchell
30032b70c9 Fixing issue with vscript restore having issues with cached weak references 2020-05-31 12:22:31 +10:00
Blixibon
4966b79f84 Added VScript material proxy, exposed more stuff to clientside VScript 2020-05-30 10:48:00 -05:00
Blixibon
0f80bfad11 Added VScript net prop manager, exposed CTakeDamageInfo/trace_t/CBaseFilter, added filter_script, expanded available functions 2020-05-30 10:42:48 -05:00
Blixibon
eb63b7b6a6 Exposed more things to VScript, including vehicles, AI goal entities, and convars 2020-05-27 10:51:11 -05:00
Blixibon
c12418e1ce Added new features and customization to base VScript functionality 2020-05-27 10:22:45 -05:00
Blixibon
6ad2745a5e Added new shared VScript functions 2020-05-24 09:41:12 -05:00
Blixibon
1f8e32ef66
Merge pull request #6 from ReDucTor/wip/vscript_support
Various vscript improvements
2020-05-24 01:07:19 -05:00
Blixibon
daae8caf20 Added CBaseCombatWeapon script description 2020-05-24 01:03:18 -05:00
Blixibon
c06bf1e1c4 Updated NPC and entity script functions, fixed RunScriptQuotable breaking with empty strings 2020-05-24 00:57:23 -05:00
James Mitchell
3c6c5c1d81 Adding vscript GetKeyValue vscript
Intended usage:
```
int nIterator = -1;
ScriptVariant_t key, value;
while ((nIterator = pScriptVM->GetKeyValue(table, nIterator, &key, &value)) != -1)
{
    printVariant(key);
    Msg("=");
    printVariant(value);
    Msg("\n");

    pScriptVM->ReleaseValue(key);
    pScriptVM->ReleaseValue(value);
}
```
2020-05-24 14:54:46 +10:00
James Mitchell
2363a22e3e Cleaning up some TODO messages 2020-05-24 11:44:26 +10:00
James Mitchell
897534aec6 Making vscript print consistent, adding printl 2020-05-24 11:18:15 +10:00
James Mitchell
d657e2b713 Adding missing Vector vscript functions 2020-05-24 10:58:24 +10:00
James Mitchell
18012de594 Adding support for vscript support for _tostring 2020-05-24 10:05:15 +10:00
Blixibon
4320ae71e7 Mapbase VScript server/client expansions 2020-05-22 20:26:31 -05:00
James Mitchell
1210dee374 Various vscript fixes
* Fixes scopes not being restored from a save
* Fixes closure environment not being restored from a save
* Fixes singletons not being properly restored from a save
* Fixes root table being incorrectly duplicated in a save
* Fixes various cases where duplicate objects could be created from a save
2020-05-21 21:24:10 +10:00
James Mitchell
33e7a45657 Removing the closure parameter for class constructor, as we now have the typetag 2020-05-20 22:23:02 +10:00
James Mitchell
e816832994 Making Vector and ClassInstanceData not be a separate heap allocation in vscript 2020-05-20 22:15:38 +10:00
James Mitchell
f3dbcaf480 Some fixes to save/restore vscript 2020-05-20 21:41:04 +10:00
James Mitchell
dc8ee0a7dd Adding missing parts from vscript Alien Swarm port 2020-05-20 21:39:50 +10:00
James Mitchell
3ad34f31a5 Fixing wrongly named group Group15 (was Group16) in logic_script entity 2020-05-19 22:44:59 +10:00
James Mitchell
d52196a0b1 Fixing bad merge of CBaseEntity::FindNamedOutput 2020-05-19 22:12:35 +10:00
James Mitchell
3bdbef4169 Initial support for vscript save/restore 2020-05-19 22:09:09 +10:00
James Mitchell
9223601321 Adding vscript implementation 2020-05-15 19:17:08 +10:00
James Mitchell
d840c57b4a Integrating vscript interface code (based on Alien Swarm) 2020-05-04 16:25:15 +10:00
Blixibon
af85131deb Mapbase v3.1
- Fixed filter_damage_mod blocking all damage which doesn't match the secondary filter regardless of secondary filter mode
- Fixed impulse 101 and other give-related commands leaving behind weapons with occupied slots
- Fixed a crash with scripted_sound's PlaySoundOnEntity when the entity doesn't exist
- Added OnSoundFinished output to ambient_generic
- Added the ability to use custom models/nuggets with item_grubnugget
- Fixed a crash with citizen medics healing nonexistent targets
- Added "SetDistLook" and "SetDistTooFar" inputs for NPCs, allowing manual adjustment of NPC sight distance
- Added keyvalue and input to env_microphone for utilizing a different audio channel
- Added "SetPitchScale" input to env_microphone
- Fixed info_player_view_proxy not using angles
- Fixed dirt variant elite model not being recognized as elite
- Made headcrab hints properly register the start of use (for hint outputs)
- Made RPG use a more realistic firing rate for NPCs which aren't constrained by slow RPG animations, like soldiers
- Added spawnflag for func_breakable_surf to correctly play the break sound
- Added keyvalue for using cheaper warn sound code for combine_mines
- Added "OnSpawnNPC" output for npc_combinedropship when it spawns a soldier, rollermine, or strider
- Added signal gesture activities
- Fixed stunstick not using metrocop knockout/stun code correctly
- Fixed a possible crash involving a NPC's weapon being removed during alt-fire
- Fixed(?) flashlight shadow filters
- Added support for multiple look entities in trigger_look
- Added npc_metropolice alt-firing
- Fixed npc_metropolice using pistol burst firing on weapon_357
- Fixed npc_metropolice not deploying manhacks/throwing grenades in standoffs
- Fixed npc_metropolice not recognizing some crouch activities correctly
- Changed weapon_357 so it runs a tracer each shot from NPCs
- Added SDK_ShatteredGlass, a Mapbase version of ShatteredGlass
- Added "SetSpeedModifier" to NPCs, based on 1upD's shadow walker code
- Made game_convar_mod much more reliable
- Fixed non-mirrored npc_turret_lab refusing to die
- Made npc_turret_lab use SMG1 ammo instead of AR2 ammo
- Fixed block LOS brushes sometimes not working with players (and possibly similar issues)
- Raised maximum renderable entities from 4096 to 16384, based on ficool2's limit research
- Added SDK_ShatteredGlass, a Mapbase version of ShatteredGlass. Can display parallax corrected cubemaps from its unbroken form
- Fixed VBSP breaking func_breakable_surf, etc. when using parallax corrected cubemaps
- Raised maximum VBSP entities from 8192 to 65536, based on ficool2's limit research
- Raised maximum VBSP worldlights from 8192 to 65536, based on ficool2's limit research
- Raised maximum VBSP overlays from 512 to 8192, based on ficool2's limit research
- Other misc. fixes
2020-05-02 02:06:02 +00:00
Blixibon
c5f3fa0778 Mapbase v3.0
- Overhauled matcher system and added expanded wildcard support, meaning "text", "te?t", "blah_test", etc. are now supported instead of only trailing *
- Added support for regular expression matching
- Added the missing matrixinvert.h file, which prevented programmers from compiling vbsp
- Fixed env_global_light brightness
- Added info_player_view_proxy, an entity which mimics a player's view (created for script_intro)
- New UnZoomWithRate and SetZoomRate inputs on env_zoom
- New "Don't change target's angles" flag on logic_measure_movement
- Fixed logic_measure_movement not using ignore origin flags correctly
- Fixed filter_damage_mod secondary filter not recognizing mode correctly
- Fixed DisableGeigerCounter causing NPCs to ignore player, and possibly fixed other adverse effects in similar code
- Added SetEntityName input for setting an entity's targetname
- Added "SetTarget" support to point_posecontroller
- Added "sk_alyx_health" convar for adjustable npc_alyx health, restored/fixed "sk_barney_health" for adjustable npc_barney health
- Added ignore flags and several direction-related inputs to math_vector
- Added pose parameter stuff to logic_modelinfo
- Fixed ChangeWeapon not changing during combat
- Fixed holster/unholster on NPCs without holster/unholster animations
- Fixed func_tank and other "player in the way" code ignoring notarget
- Added SetPoseParameter input to animating entities
- Introduced an experimental chapter system which allows for custom chapter title/restriction management
- Added SetChapterTitle input to worldspawn for dynamic title changing
- Fixed func_tankairboatgun damage credit, added ability to use its damage keyvalues
- Fixed mapbase_rpc_enabled not actually affecting RPC
- Moved some newly found Combine soldier grenade code to ai_grenade for other grenade users
- Fixed some problems with the new shared activities
- Restored an old Mapbase entity as "prop_interactable", an entity which contains all of the functionality of a func_button/func_door in a prop entity
- Added env_microphone pitch scale for scaling the pitch of transmitted sounds
- Added experimental, long-overdue code for scenes to be able to access !target#'s and other scene-related names through AI_INPUT
- Added "mat_specular_disable_on_missing", which "disables" specular reflections when the cubemap texture is missing
- Fixed $envmapmasktransform and $bumptransform on VertexLitGeneric and related shaders
- Areaportal leaks now stop compilation in leaktest
- Replaced "-nodefaultcubemap" with "-defaultcubemap" as the shader changes allow maps to compile without default cubemaps by default with little effect
2020-02-05 19:08:49 +00:00
Blixibon
b8611071c5 Mapbase v2.1
- Fixed parallax corrected cubemaps not working when cubemaps are disabled
- Fixed a crash with some new script_intro code
- Fixed item_health/suitcharger not emptying or using correct animation with keyvalue charge
- Added a new "Always touchable" spawnflag for weapons and items that should disregard obstructions
- Added "OnFoundNPC" output on scripted_sequence for when a NPC starts moving to play the script
- Fixed npc_snipers not working when parented or not working when attacking parented targets
- Changed "ai_nographrebuildmessage" to "ai_norebuildgraphmessage" to reduce confusion and increase visibility (it is assumed nobody was using it before, at least not in a compatibility-breaking way)
- Added damage bit modification to filter_damage_mod
- Added Add/RemoveSolidFlags input to all entities + added "Collide with owner" solid flag from the VDC
- Added custom model support to item_health/suitcharger
2019-12-18 00:15:59 +00:00