AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Extensions (https://forums.alliedmods.net/forumdisplay.php?f=134)
-   -   [EXTENSION] [L4D2] Melee Spawn Control (1.0.0.4) (https://forums.alliedmods.net/showthread.php?t=222535)

V10 08-03-2013 22:14

[EXTENSION] [L4D2] Melee Spawn Control (1.0.0.4)
 
2 Attachment(s)
With this extension you can simple unlock all melee weapons.
Extension gives cvar l4d_melee_weapons for set list of spawned melee weapons at map.

Default value:
Code:

fireaxe;frying_pan;machete;baseball_bat;crowbar;cricket_bat;tonfa;katana;electric_guitar;knife;golfclub

Changelog
1.0.0.4
- Added cvars registration.
1.0.0.3
- Fixed memory leaks on Windows (thanks to psychonic)
1.0.0.2b
- Added knife support.
1.0.0.1b
- Renamed extension, renamed extension filename, renamed main class, renamed gamedata file
- Linux version now no have memory leak
1.0.0.0b
- Initial version.

Known issue
Incorrect cvar name in extension .dll and .so description.

Tested on linux and windows.

---------------------------------------------------------------------
See also other my extensions and plugins fixes 8+ bugs:
- [L4D2] Infected Fix Spawn
- [L4D2] Defibrillator Bug Fix
- [L4D2] Upgrade packs BUG FIX
- [L4D2] 8+ players Bug Fixes

Electr000999 08-04-2013 03:33

Re: [EXTENSION] [L4D2] Melee Control (spawn) (1.0.0.0)(BETA)
 
hi, hmm can you add cvar for set custom melee list ?, i have custom melee and this good help me on problem after update )

and even when they were unlocking addons, we just washed the parameter file of the mission with a list of available weapons on the map, it is possible to realize through your extension?

////////// (On russian)

и еще когда были аддоны разлочки, мы просто стирали параметр из файла миссии со списком доступного ближнего оружия на карте, можно ли это реализовать через ваше расширение?, в таком случае мне кажется память не будет засорятся.., и спасибо за хорошее начало и поддержку L4D2 сообщества)

spumer 08-04-2013 03:45

Re: [EXTENSION] [L4D2] Melee Control (spawn) (1.0.0.0)(BETA)
 
1 Attachment(s)
V10, I'm use this trick as left4downtown2 modification. No server crashes. May be you can use it.

V10 08-04-2013 06:31

Re: [EXTENSION] [L4D2] Melee Control (spawn) (1.0.0.0)(BETA)
 
Quote:

Originally Posted by Electr000999 (Post 2005265)
hi, hmm can you add cvar for set custom melee list ?, i have custom melee and this good help me on problem after update )

and even when they were unlocking addons, we just washed the parameter file of the mission with a list of available weapons on the map, it is possible to realize through your extension?

No, because we cant free memory of original string.

V10 08-04-2013 06:36

Re: [EXTENSION] [L4D2] Melee Control (spawn) (1.0.0.0)(BETA)
 
Quote:

Originally Posted by spumer (Post 2005269)
V10, I'm use this trick as left4downtown2 modification. No server crashes. May be you can use it.

Thanks, but it not helps. Today I get more tests.
In Linux KeyValues.SetString working fine as well. Today I rewrite different code for linux.
But in Windows trying to call KeyValues.SetString get crash (memory corruption exception) always. I think it problems in compiler settings or something in msvc. So in windows I use old code (with leak).

psychonic 08-04-2013 10:13

Re: [EXTENSION] [L4D2] Melee Control (spawn) (1.0.0.0)(BETA)
 
Quote:

Originally Posted by V10 (Post 2005332)
Thanks, but it not helps. Today I get more tests.
But in Windows trying to call KeyValues.SetString get crash (memory corruption exception) always. I think it problems in compiler settings or something in msvc. So in windows I use old code (with leak).

It's because of freeing memory that was allocated on a different heap.

Both the game and the extension are compiled with /MT, statically linking the msvcrt (instead of dynamically linking [/MD] and sharing the heap).

You'll have to directly call the game's copy of KeyValues::SetString for a KeyValue* allocated by the game.

V10 08-04-2013 10:57

Re: [EXTENSION] [L4D2] Melee Control (spawn) (1.0.0.0)(BETA)
 
Quote:

Originally Posted by psychonic (Post 2005446)
It's because of freeing memory that was allocated on a different heap.

Both the game and the extension are compiled with /MT, statically linking the msvcrt (instead of dynamically linking [/MD] and sharing the heap).

You'll have to directly call the game's copy of KeyValues::SetString for a KeyValue* allocated by the game.

Thanks.

Sev 08-04-2013 11:34

Re: [EXTENSION] [L4D2] Melee Spawn Control (1.0.0.2)(BETA)
 
This will prove to be a valuable addition to the community V10.

Seeing as how Valve has done something to effect the way server side vpks work now, causing vpks that aren't tied to custom campaigns to not work

One of those vpks was one that unlocked all the melee weapons for all the campaigns, along with allowing the female boomer on all campaigns including the L4D1 campaigns.

V10 08-04-2013 13:07

Re: [EXTENSION] [L4D2] Melee Spawn Control (1.0.0.3)
 
Version updated to 1.0.0.3:
- Fixed memory leaks on Windows (thanks to psychonic)

Electr000999 08-04-2013 13:09

Re: [EXTENSION] [L4D2] Melee Spawn Control (1.0.0.3)
 
Quote:

Extension gives cvar sm_melee_weapon_list for set list of spawned melee weapons at map.

sm_cvar sm_melee_weapon_list
[SM] Unable to find cvar: sm_melee_weapon_list

i put version (1.0.0.3), older delete


All times are GMT -4. The time now is 05:06.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.