Initial implementation of fishing system. A couple bugs fixed, e.g. zombies that are killed by residents actually die.
This commit is contained in:
+4
-1
@@ -30,6 +30,7 @@ sound_pool p(300);
|
||||
#include "src/save_system.nvgt"
|
||||
#include "src/base_system.nvgt"
|
||||
#include "src/time_system.nvgt"
|
||||
#include "src/fishing.nvgt"
|
||||
#include "src/weather.nvgt"
|
||||
#include "src/audio_utils.nvgt"
|
||||
#include "src/creature_audio.nvgt"
|
||||
@@ -400,6 +401,8 @@ void main()
|
||||
search_timer.restart();
|
||||
perform_search(x);
|
||||
}
|
||||
|
||||
update_fishing();
|
||||
|
||||
// Sling charge detection
|
||||
if (sling_equipped && (key_down(KEY_LCTRL) || key_down(KEY_RCTRL)) && !sling_charging) {
|
||||
@@ -434,7 +437,7 @@ void main()
|
||||
if (spear_equipped) attack_cooldown = 800;
|
||||
if (axe_equipped) attack_cooldown = 1600;
|
||||
|
||||
if((key_down(KEY_LCTRL) || key_down(KEY_RCTRL)) && attack_timer.elapsed > attack_cooldown)
|
||||
if(!fishing_pole_equipped && (key_down(KEY_LCTRL) || key_down(KEY_RCTRL)) && attack_timer.elapsed > attack_cooldown)
|
||||
{
|
||||
attack_timer.restart();
|
||||
perform_attack(x);
|
||||
|
||||
Reference in New Issue
Block a user