Necrogiant

Painkiller SinglePlayer/MultiPlayer FPS Limiter


Creative Corner

User avatar

Posts: 20

Joined: Sat Oct 04, 2014 4:58 pm

Post Fri Jun 05, 2015 12:42 pm

Painkiller SinglePlayer/MultiPlayer FPS Limiter

Atom0s have made this great fix for painkiller:

http://atom0s.com/forums/viewtopic.php?f=15&t=70

I've created a simple rar, with modification, that you can use (pk black 1.64): Click here or see the attachment.

The default maxfps is now 120, for SinglePlayer, you can change it by writing in the console "/setmaxfps" and the number you want. After that the settings will be writed in the Config.ini in the Bin folder. Value 0 is unlimited, as default.

Modification are:

######Cfg.lua######

Added:

  Code:
MaxFpsSP = 120,


below:

  Code:
MaxFpsMP = 120,


######Game.lua######

Added:

  Code:
WORLD.SetMaxFPS(Cfg.MaxFpsSP);


below:

  Code:
--AddAction({{"Wait:1"},{"L:StringToDo = 'Console:Cmd_EXPO()'"}})


Added also:

  Code:
WORLD.SetMaxFPS(Cfg.MaxFpsMP)


below:

  Code:
self:OnMultiplayerClientTick(delta)


#####Console.lua######

Find the line:

  Code:
function Console:Cmd_SETMAXFPS(val)


Then replace:

  Code:
if Game.GMode == GModes.MultiplayerClient then


with:

  Code:
if Game.GMode == GModes.MultiplayerServer or Game.GMode == GModes.MultiplayerClient then


Also add:

  Code:
else
Cfg.MaxFpsSP = val


below:

  Code:
Cfg.MaxFpsMP = val


Just put the LScripts folder in the Data folder, enjoy!


If you mod the same files of the game like above, you can use it for other Painkiller games too (don't use that one, but mod them yourself).
Attachments
Painkiller SinglePlayer FPS Limiter_v2.zip
(33.61 KiB) Downloaded 39 times
Last edited by Peppins on Mon Feb 19, 2018 1:41 pm, edited 7 times in total.
User avatar

Posts: 20

Joined: Sat Oct 04, 2014 4:58 pm

Post Wed Jul 01, 2015 3:01 pm

Re: Painkiller SinglePlayer FPS Limiter

Updated with fix, now work also if you start a new multiplayer game.

Return to Mods

Who is online

Users browsing this forum: No registered users and 0 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software