mirror of
https://github.com/IntQuant/noita_entangled_worlds.git
synced 2025-10-19 15:13:16 +00:00
Use actually random seeds
This commit is contained in:
parent
356c7e5edc
commit
ef2f5806a2
3 changed files with 15 additions and 3 deletions
3
init.lua
3
init.lua
|
@ -120,6 +120,9 @@ function OnPlayerSpawned( player_entity ) -- This runs when player entity has be
|
||||||
np.SetPauseState(4)
|
np.SetPauseState(4)
|
||||||
np.SetPauseState(0)
|
np.SetPauseState(0)
|
||||||
|
|
||||||
|
local hp = util.get_ent_health(player_entity)
|
||||||
|
util.set_ent_health(player_entity, {hp*3, hp*3})
|
||||||
|
|
||||||
EntityAddTag(player_entity, "polymorphable_NOT") -- TODO
|
EntityAddTag(player_entity, "polymorphable_NOT") -- TODO
|
||||||
|
|
||||||
if ctx.is_host then
|
if ctx.is_host then
|
||||||
|
|
|
@ -262,8 +262,15 @@ impl NetManager {
|
||||||
Some("game_over") => {
|
Some("game_over") => {
|
||||||
if self.is_host() {
|
if self.is_host() {
|
||||||
info!("Game over, resending game settings");
|
info!("Game over, resending game settings");
|
||||||
self.settings.lock().unwrap().seed += 1;
|
{
|
||||||
info!("New seed: {}", self.settings.lock().unwrap().seed);
|
let mut setting = self.settings.lock().unwrap();
|
||||||
|
if setting.debug_mode {
|
||||||
|
setting.seed += 1;
|
||||||
|
} else {
|
||||||
|
setting.seed = rand::random();
|
||||||
|
}
|
||||||
|
info!("New seed: {}", setting.seed);
|
||||||
|
}
|
||||||
self.resend_game_settings();
|
self.resend_game_settings();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
2
todo.txt
2
todo.txt
|
@ -35,3 +35,5 @@
|
||||||
- test tangled better
|
- test tangled better
|
||||||
- poly on clients
|
- poly on clients
|
||||||
- proxy: stop receiving connections before another start_game on game over, noita: try to reconnect to proxy.
|
- proxy: stop receiving connections before another start_game on game over, noita: try to reconnect to proxy.
|
||||||
|
- sync traps
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue