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

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002039Zandronum[All Projects] Suggestionpublic2014-12-29 21:222015-01-10 17:09
ReporterMonsterovich 
Assigned To 
PrioritynormalSeverityfeatureReproducibilitysometimes
StatusnewResolutionopen 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0002039: LMS CVar improvements
DescriptionWhat my patch does:
- Removed lms_allow@WEAPONNAMEFROMDOOM2@ (because it doesn't work with custom weapons and cannot disallow them)
- Replaced integer cvar lms_allowedweapons with string that contains names of allowed weapons (default is:"Chainsaw,Fist,Pistol,Shotgun,SuperShotgun,Chaingun,RocketLauncher,PlasmaRifle")
if it's empty then all weapons are disallowed
- Added new cvar lms_onlyallowedweapons that controls lms_allowedweapons (false - all weapons are allowed, true - only weapons from the list are allowed)
Also, I removed other liminations:
- Added sv_lmsstarthealth (default is 200)
- Added sv_lmsstartinventory (default is: "GreenArmor,PowerStrength" in doom or "SilverArmor" in heretic)
Attached Filesdiff file icon lms.diff [^] (11,159 bytes) 2014-12-29 21:22 [Show Content]
diff file icon lms2.diff [^] (11,771 bytes) 2015-01-10 16:39 [Show Content]
diff file icon lms2fix.diff [^] (11,307 bytes) 2015-01-10 16:42 [Show Content]
diff file icon lms3.diff [^] (9,556 bytes) 2015-01-10 17:09 [Show Content]

- Relationships

-  Notes
User avatar (0011135)
Dusk (developer)
2014-12-29 21:50
edited on: 2014-12-29 21:52

I like the premise of the patch for the most part, though..

char *weapon = strtok((char*)FString(lmsallowedweapons).GetChars(), ",");


First you cast lmsallowedweapons to FString via constructor, then to const char* via GetChars(), then to char* via a C-style const cast?! And then you proceed to pass this to strtok which mutates its value..?

Using FString::IndexOf should produce a much cleaner version here. At least you should copy the value of lmsallowedweapons to a temporary buffer to make strtok safer to use.

User avatar (0011358)
Edward-san (developer)
2015-01-10 17:01

When you're making a new diff, please use unified diff ( '-u' option ).
User avatar (0011359)
Monsterovich (reporter)
2015-01-10 17:09

Ahh, sorry. Fixed.

Issue Community Support
Only registered users can voice their support. Click here to register, or here to log in.
Supporters: Monsterovich Klofkac
Opponents: No one explicitly opposes this issue yet.

- Issue History
Date Modified Username Field Change
2014-12-29 21:22 Monsterovich New Issue
2014-12-29 21:22 Monsterovich File Added: lms.diff
2014-12-29 21:50 Dusk Note Added: 0011135
2014-12-29 21:52 Dusk Note Edited: 0011135 View Revisions
2015-01-10 16:39 Monsterovich File Added: lms2.diff
2015-01-10 16:42 Monsterovich File Added: lms2fix.diff
2015-01-10 17:01 Edward-san Note Added: 0011358
2015-01-10 17:09 Monsterovich File Added: lms3.diff
2015-01-10 17:09 Monsterovich Note Added: 0011359






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2025 MantisBT Team
Powered by Mantis Bugtracker