From c6e5128a84e76a8f46199ad3976ea0d426b1ce03 Mon Sep 17 00:00:00 2001 From: sapier Date: Thu, 3 Oct 2013 19:45:13 +0200 Subject: [PATCH] Add new swim movement pattern Cleanup useless comments in patterns --- .../movement_patterns/flight_pattern1.lua | 5 --- .../movement_patterns/run_and_jump_low.lua | 6 ---- .../movement_patterns/stop_and_go.lua | 6 ---- .../movement_patterns/swim_pattern1.lua | 6 ---- .../movement_patterns/swim_pattern2.lua | 6 ---- .../movement_patterns/swim_pattern3.lua | 35 +++++++++++++++++++ 6 files changed, 35 insertions(+), 29 deletions(-) create mode 100644 mobf/mgen_probab/movement_patterns/swim_pattern3.lua diff --git a/mobf/mgen_probab/movement_patterns/flight_pattern1.lua b/mobf/mgen_probab/movement_patterns/flight_pattern1.lua index 30ad0cd..8bd1f78 100644 --- a/mobf/mgen_probab/movement_patterns/flight_pattern1.lua +++ b/mobf/mgen_probab/movement_patterns/flight_pattern1.lua @@ -27,11 +27,6 @@ local flight_pattern1_prototype = { random_jump_initial_speed =0, random_jump_delay =10, random_acceleration_change =0.3, --- --- --run towards player or run away? 1 <-> -1 --- player_attraction =0, --- --maximum distance a player has an effect --- player_attraction_range =-1, } --!@} diff --git a/mobf/mgen_probab/movement_patterns/run_and_jump_low.lua b/mobf/mgen_probab/movement_patterns/run_and_jump_low.lua index 25aecd1..7c3fec6 100644 --- a/mobf/mgen_probab/movement_patterns/run_and_jump_low.lua +++ b/mobf/mgen_probab/movement_patterns/run_and_jump_low.lua @@ -28,12 +28,6 @@ local run_and_jump_low_prototype = { random_jump_initial_speed =3.5, random_jump_delay =2, random_acceleration_change =0.6, - --- --- --run towards player or run away? 1 <-> -1 --- player_attraction =0, --- --maximum distance a player has an effect --- player_attraction_range =-1, } --!~@} diff --git a/mobf/mgen_probab/movement_patterns/stop_and_go.lua b/mobf/mgen_probab/movement_patterns/stop_and_go.lua index aaca5ec..e1e4369 100644 --- a/mobf/mgen_probab/movement_patterns/stop_and_go.lua +++ b/mobf/mgen_probab/movement_patterns/stop_and_go.lua @@ -26,12 +26,6 @@ local stop_and_go_prototype = { random_jump_initial_speed =0, random_jump_delay =0, random_acceleration_change =0.01, - --- --- --run towards player or run away? 1 <-> -1 --- player_attraction =0, --- --maximum distance a player has an effect --- player_attraction_range =-1, } --!@} diff --git a/mobf/mgen_probab/movement_patterns/swim_pattern1.lua b/mobf/mgen_probab/movement_patterns/swim_pattern1.lua index 9cfa87e..672444b 100644 --- a/mobf/mgen_probab/movement_patterns/swim_pattern1.lua +++ b/mobf/mgen_probab/movement_patterns/swim_pattern1.lua @@ -26,12 +26,6 @@ local swim_pattern1_prototype = { random_jump_initial_speed =0, random_jump_delay =10, random_acceleration_change =0.5, - --- --- --run towards player or run away? 1 <-> -1 --- player_attraction =0, --- --maximum distance a player has an effect --- player_attraction_range =-1, } --!@} diff --git a/mobf/mgen_probab/movement_patterns/swim_pattern2.lua b/mobf/mgen_probab/movement_patterns/swim_pattern2.lua index 7dbc342..08013c9 100644 --- a/mobf/mgen_probab/movement_patterns/swim_pattern2.lua +++ b/mobf/mgen_probab/movement_patterns/swim_pattern2.lua @@ -26,12 +26,6 @@ local swim_pattern2_prototype = { random_jump_initial_speed =0, random_jump_delay =15, random_acceleration_change =0.7, - --- --- --run towards player or run away? 1 <-> -1 --- player_attraction =0, --- --maximum distance a player has an effect --- player_attraction_range =-1, } --!@} diff --git a/mobf/mgen_probab/movement_patterns/swim_pattern3.lua b/mobf/mgen_probab/movement_patterns/swim_pattern3.lua new file mode 100644 index 0000000..2d7ef76 --- /dev/null +++ b/mobf/mgen_probab/movement_patterns/swim_pattern3.lua @@ -0,0 +1,35 @@ +------------------------------------------------------------------------------- +-- Mob Framework Mod by Sapier +-- +-- You may copy, use, modify or do nearly anything except removing this +-- copyright notice. +-- And of course you are NOT allow to pretend you have written it. +-- +--! @file swim_pattern1.lua +--! @brief movementpattern for slow swimming mobs +--! @copyright Sapier +--! @author Sapier +--! @date 2012-08-10 +-- +--! @addtogroup mpatterns +--! @{ +-- Contact sapier a t gmx net +------------------------------------------------------------------------------- + +--! @struct swim_pattern1_prototype +--! @brief movement pattern for mobs swimming slow +local swim_pattern3_prototype = { + name ="swim_pattern3", + jump_up =0, + + random_jump_chance =0.2, + random_jump_initial_speed =0, + random_jump_delay =10, + random_acceleration_change =0.5, + + min_height_above_ground = 3 + } + +--!@} + +table.insert(mov_patterns_defined,swim_pattern3_prototype) \ No newline at end of file