• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

Code Game Freezes when loading mutator

Youg

Grizzled Veteran
Jan 19, 2013
60
0
So I tried to update my LAN server to get it back in the server browser in-game, which never worked, so I downloaded a new server pack and just did the edits to get it to being the same.

And it runs and loads fine, no game crashes or any of what I've seen being reported. However I go to add my mutator to it which downloads client-side, which I've been developing with some outstanding help from Ducky in the coding forums, and it then causes the game to freeze.

Now I weren't sure which part of the forum to post this in, hence why I went with general support. But I get to connect to my newly created server, the server logs the connection and that there is a player, however it gets to the "Connecting..." screen just before team select where the game freezes.

It's obviously something to do with the mutator so I put in -log on the launch options in Steam, advised by Ducky and this is what I get before the freezing:

Warning: Warning, Failed to load 'Class None.' : Failed to find object 'Class None'
Warning: Warning, Failed to find object 'Class None.'
DevPhysics: Error(1) in file ..\..\Physics\src\cloth\NpCloth.cpp, line 82: NxCloth::setStretchingStiffness: stiffness must be 0-1!
DevPhysics: Error(1) in file ..\..\Physics\src\cloth\NpCloth.cpp, line 82: NxCloth::setStretchingStiffness: stiffness must be 0-1!
DevPhysics: Error(1) in file ..\..\Physics\src\cloth\NpCloth.cpp, line 82: NxCloth::setStretchingStiffness: stiffness must be 0-1!

Any help would be greatly appreciated on this, also on the problem that my original server that worked fine before the update, stopped showing up after it, but there's another post for that started by Viceman in the dedicated server bit.
 
Your log function is called on every tick on the client. Those ticks start to come in directly after the player is fully connected to the server (before the team select screen). In your log function you do:
while((MyPawn.Stamina < 40.0) && !MyPawn.HeavyBreathingSound.IsPlaying())
This means you look on each tick. That loop depends on variables over which you do not have control. In other words you don't know how long it will loop there. In this case you will loop forever because Stamina isn't yet assigned a value (cos game didn't start yet) and that sound cue is for sure not playing.

You can't loop like that in a tick handler. If your tick handler is still active while the next tick should occur, then... crash!
 
Upvote 0
awesome! Easy fix then, just back to the other thread to try and find why it doesn't play the soundcue, thought if I went with a while loop it would force the game to play it while the parameters were met.

I say this cus I couldn't find any TWI file/class that would be stopping the soundcue from playing.

Update:

I've managed to get it playing and logging now. Though got a new issue in another post.
 
Last edited:
Upvote 0