diff --git a/game/engines/default/engine/version.lua b/game/engines/default/engine/version.lua index 09a7015693e4b38cdad11b721468dda12ab3449a..829533d62da85cd5c49d1894b2475d7f5252b756 100644 --- a/game/engines/default/engine/version.lua +++ b/game/engines/default/engine/version.lua @@ -18,7 +18,7 @@ -- darkgod@te4.org -- Engine Version -engine.version = {0,9,10,"te4",1} +engine.version = {0,9,10,"te4",2} engine.require_c_core = engine.version[5] engine.version_id = ("%s-%d_%d.%d.%d"):format(engine.version[4], engine.require_c_core, engine.version[1], engine.version[2], engine.version[3]) diff --git a/game/modules/tome/class/Game.lua b/game/modules/tome/class/Game.lua index bff5aef4b5f6f0d2fe3afaa907c93366163c1c46..7c4d8a9ba7369fd7af6ca422a173ce6ae62ba1d5 100644 --- a/game/modules/tome/class/Game.lua +++ b/game/modules/tome/class/Game.lua @@ -135,7 +135,7 @@ function _M:newGame() self.player.wild_x, self.player.wild_y = self.player.default_wilderness[1], self.player.default_wilderness[2] self.player.last_wilderness = self.player.default_wilderness[3] or "wilderness" - self:changeLevel(1, self.player.starting_zone) + self:changeLevel(self.player.starting_level or 1, self.player.starting_zone) print("[PLAYER BIRTH] resolve...") self.player:resolve() self.player:resolve(nil, true) @@ -518,8 +518,8 @@ function _M:setupCommands() end, [{"_g","ctrl"}] = function() if config.settings.tome.cheat then - self:changeLevel(15, "high-peak") - self.player:grantQuest("high-peak") + self:changeLevel(1, "test") +-- self.player:grantQuest("test") end end, } diff --git a/game/modules/tome/data/birth/races/undead.lua b/game/modules/tome/data/birth/races/undead.lua index 4619d2d555f38a68cd3618d390cfff881b707c8b..e8c009e89707f9eff339b838103d9bdb54ebcd82 100644 --- a/game/modules/tome/data/birth/races/undead.lua +++ b/game/modules/tome/data/birth/races/undead.lua @@ -44,6 +44,10 @@ newBirthDescriptor{ }, copy = { faction = "undead", + default_wilderness = {34, 49}, + starting_zone = "paths-of-the-dead", + starting_level = 8, + starting_quest = "start-undead", undead = 1, } } @@ -79,9 +83,6 @@ newBirthDescriptor }, copy = { type = "undead", subtype="ghoul", - default_wilderness = {43, 18}, - starting_zone = "trollshaws", - starting_quest = "start-dunadan", starting_intro = "ghoul", life_rating=14, poison_immune = 0.8, @@ -124,8 +125,6 @@ newBirthDescriptor copy = { type = "undead", subtype="skeleton", default_wilderness = {43, 18}, - starting_zone = "trollshaws", - starting_quest = "start-dunadan", starting_intro = "skeleton", life_rating=12, poison_immune = 1, diff --git a/game/modules/tome/data/chats/assassin-lord.lua b/game/modules/tome/data/chats/assassin-lord.lua index e983defd4ea5dafce1e97bd84daf45edc34baba1..88ad9ff92bd29f819595d0debb724c38c25b7c9b 100644 --- a/game/modules/tome/data/chats/assassin-lord.lua +++ b/game/modules/tome/data/chats/assassin-lord.lua @@ -39,7 +39,7 @@ newChat{ id="what", text = [[Oh, so this is the part where I tell you my plan before you attack me ? GET THIS INTRUDER!]], answers = { {"[attack]", action=function(npc, player) engine.Faction:setFactionReaction(player.faction, npc.faction, -100, true) end}, - {"Wait! Maybe we could work out some kind of arrangement, you seem to be a pratical men.", jump="offer"}, + {"Wait! Maybe we could work out some kind of arrangement, you seem to be a practical men.", jump="offer"}, } } newChat{ id="greed", diff --git a/game/modules/tome/data/general/grids/void.lua b/game/modules/tome/data/general/grids/void.lua index 20094d795f6b21c9f5c7d0ffccbf734762e4d9ec..a9dff263a9ad74ca72279ce0b0955e5b2b1f96ab 100644 --- a/game/modules/tome/data/general/grids/void.lua +++ b/game/modules/tome/data/general/grids/void.lua @@ -27,3 +27,13 @@ newEntity{ display = ' ', _noalpha = false, } + +newEntity{ + define_as = "SPACE_TURBULENCE", + name = "space turbulence", + display = '#', color=colors.WHITE, + shader = "space_turbulence", textures = { function() return _3DNoise, true end }, + always_remember = true, + does_block_move = true, + _noalpha = false, +} diff --git a/game/modules/tome/data/gfx/particles/starfield.lua b/game/modules/tome/data/gfx/particles/starfield.lua index 46e4412cbc10714343b67ef6b4abfab595d4ac55..ecceeddcebe9108a020c41af2bacadd3f3bcea77 100644 --- a/game/modules/tome/data/gfx/particles/starfield.lua +++ b/game/modules/tome/data/gfx/particles/starfield.lua @@ -17,26 +17,30 @@ -- Nicolas Casalini "DarkGod" -- darkgod@te4.org -local dir = rng.range(0, 360) +local side = rng.table{4,6,2,8} local blur = blur or 0 local first = true -local life = (width + height) / 2 -local sides -if dir >= 0 and dir < 90 then sides = {8,6} -elseif dir >= 90 and dir < 180 then sides = {8,4} -elseif dir >= 180 and dir < 270 then sides = {2,4} -else sides = {2,6} +local life +if side == 2 then dir = 90 life = height +elseif side == 8 then dir = 270 life = height +elseif side == 4 then dir = 180 life = width +elseif side == 6 then dir = 0 life = width end dir = math.rad(dir) +local first = true + return { generator = function() - local side = rng.table(sides) local x, y - if side == 2 then x = rng.range(0, width) y = height - elseif side == 8 then x = rng.range(0, width) y = 0 - elseif side == 6 then x = 0 y = rng.range(0, height) - else x = width y = rng.range(0, height) + if first then + x = rng.range(0, width) y = rng.range(0, height) + else + if side == 2 then x = rng.range(0, width) y = 0 + elseif side == 8 then x = rng.range(0, width) y = height + elseif side == 6 then x = 0 y = rng.range(0, height) + else x = width y = rng.range(0, height) + end end local vel = rng.float(0.3, 2) @@ -56,6 +60,11 @@ return { generator = function() } end, }, function(self) - self.ps:emit(1) + if first then + self.ps:emit(700) + else + self.ps:emit(1) + end + first = false end, 1000 diff --git a/game/modules/tome/data/gfx/shaders/space_turbulence.frag b/game/modules/tome/data/gfx/shaders/space_turbulence.frag new file mode 100644 index 0000000000000000000000000000000000000000..704acea6fc214da6a946cd72d0f60c9fcf705dd1 --- /dev/null +++ b/game/modules/tome/data/gfx/shaders/space_turbulence.frag @@ -0,0 +1,21 @@ +uniform float tick; +uniform sampler3D noisevol; +uniform vec2 mapCoord; +uniform vec4 displayColor; +uniform vec4 color1; +uniform vec4 color2; + +void main(void) +{ + float fTime0_X = tick / 30000.0; + vec2 coord = mapCoord+gl_TexCoord[0].xy; + float noisy = texture3D(noisevol,vec3(coord,fTime0_X)).r; + float noisy2 = texture3D(noisevol,vec3(coord/5.0,fTime0_X)).r; + float noisy3 = texture3D(noisevol,vec3(coord/7.0,fTime0_X)).r; + float noise = (noisy+noisy2+noisy3)/3.0; + + float bump = 1.0-abs((2.0 * noise)-1.0); + bump *= bump - 0.3; + gl_FragColor = mix(color1, color2, bump) * displayColor; + gl_FragColor.a = 0.4; +} diff --git a/game/modules/tome/data/gfx/shaders/space_turbulence.lua b/game/modules/tome/data/gfx/shaders/space_turbulence.lua new file mode 100644 index 0000000000000000000000000000000000000000..aa6a772a15d1efcd5481c610e71f1d2c99e51c9b --- /dev/null +++ b/game/modules/tome/data/gfx/shaders/space_turbulence.lua @@ -0,0 +1,29 @@ +-- ToME - Tales of Middle-Earth +-- Copyright (C) 2009, 2010 Nicolas Casalini +-- +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation, either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see <http://www.gnu.org/licenses/>. +-- +-- Nicolas Casalini "DarkGod" +-- darkgod@te4.org + +return { + frag = "space_turbulence", + vert = nil, + args = { + noisevol = { texture = 1 }, + color2 = {0.3,0.3,0.3,0.3}, + color1 = {0,0,0,0.3}, + }, + clone = false, +} diff --git a/game/modules/tome/data/quests/start-undead.lua b/game/modules/tome/data/quests/start-undead.lua new file mode 100644 index 0000000000000000000000000000000000000000..148a44d4b106efb4d019e4bf1d42340f0479bc35 --- /dev/null +++ b/game/modules/tome/data/quests/start-undead.lua @@ -0,0 +1,32 @@ +-- ToME - Tales of Middle-Earth +-- Copyright (C) 2009, 2010 Nicolas Casalini +-- +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation, either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see <http://www.gnu.org/licenses/>. +-- +-- Nicolas Casalini "DarkGod" +-- darkgod@te4.org + +name = "The rotting stench of the dead" +desc = function(self, who) + local desc = {} + desc[#desc+1] = "\n" + return table.concat(desc, "\n") +end + +on_status_change = function(self, who, status, sub) + if self:isCompleted() then + who:setQuestStatus(self.id, engine.Quest.DONE) + who:grantQuest("starter-zones") + end +end diff --git a/game/modules/tome/data/talents/gifts/summon-utility.lua b/game/modules/tome/data/talents/gifts/summon-utility.lua index c580497fdc4ccf8f3730a00c9c5f21a81bd0651b..7a6b2e96790d5e922621bc4792320670316ca8aa 100644 --- a/game/modules/tome/data/talents/gifts/summon-utility.lua +++ b/game/modules/tome/data/talents/gifts/summon-utility.lua @@ -167,7 +167,7 @@ newTalent{ local NPC = require "mod.class.NPC" local m = NPC.new{ - type = "animal", subtype = "turle", + type = "animal", subtype = "turtle", display = "R", color=colors.GREEN, name = "turtle", faction = self.faction, desc = [[]], diff --git a/game/modules/tome/data/zones/paths-of-the-dead/grids.lua b/game/modules/tome/data/zones/paths-of-the-dead/grids.lua new file mode 100644 index 0000000000000000000000000000000000000000..14dc047df0c83b59498fb0f62c673df2fbc8ca70 --- /dev/null +++ b/game/modules/tome/data/zones/paths-of-the-dead/grids.lua @@ -0,0 +1,20 @@ +-- ToME - Tales of Middle-Earth +-- Copyright (C) 2009, 2010 Nicolas Casalini +-- +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation, either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see <http://www.gnu.org/licenses/>. +-- +-- Nicolas Casalini "DarkGod" +-- darkgod@te4.org + +load("/data/general/grids/basic.lua") diff --git a/game/modules/tome/data/zones/paths-of-the-dead/npcs.lua b/game/modules/tome/data/zones/paths-of-the-dead/npcs.lua new file mode 100644 index 0000000000000000000000000000000000000000..85aa1d78ff1d0651a4e1ecd0eb68e17091de3b40 --- /dev/null +++ b/game/modules/tome/data/zones/paths-of-the-dead/npcs.lua @@ -0,0 +1,64 @@ +-- ToME - Tales of Middle-Earth +-- Copyright (C) 2009, 2010 Nicolas Casalini +-- +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation, either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see <http://www.gnu.org/licenses/>. +-- +-- Nicolas Casalini "DarkGod" +-- darkgod@te4.org + +load("/data/general/npcs/rodent.lua", rarity(0)) +load("/data/general/npcs/vermin.lua", rarity(2)) +load("/data/general/npcs/molds.lua", rarity(1)) +load("/data/general/npcs/skeleton.lua", rarity(0)) +load("/data/general/npcs/snake.lua", rarity(2)) + +load("/data/general/npcs/all.lua", rarity(4, 35)) + +local Talents = require("engine.interface.ActorTalents") + +-- The boss of Amon Sul, no "rarity" field means it will not be randomly generated +newEntity{ define_as = "SHADE_OF_ANGMAR", + type = "undead", subtype = "skeleton", unique = true, + name = "The Shade of Angmar", + display = "s", color=colors.VIOLET, + shader = "unique_glow", + desc = [[This skeleton looks nasty. There is red flames in its empty eye sockets. It wield a nasty sword and towers toward you, throwing spells.]], + level_range = {7, 20}, exp_worth = 2, + max_life = 150, life_rating = 15, fixed_rating = true, + max_mana = 85, + max_stamina = 85, + rank = 4, + size_category = 3, + infravision = 20, + stats = { str=16, dex=12, cun=14, mag=25, con=16 }, + instakill_immune = 1, + blind_immune = 1, + move_others=true, + + body = { INVEN = 10, MAINHAND=1, OFFHAND=1, BODY=1 }, + equipment = resolvers.equip{ {type="weapon", subtype="staff", defined="STAFF_ANGMAR", autoreq=true}, {type="armor", subtype="light", autoreq=true}, }, + drops = resolvers.drops{chance=100, nb=3, {ego_chance=100} }, + + resolvers.talents{ + [Talents.T_MANA_POOL]=1, [Talents.T_MANATHRUST]=4, [Talents.T_FREEZE]=4, [Talents.T_TIDAL_WAVE]=2, + [Talents.T_STAMINA_POOL]=1, [Talents.T_SWORD_MASTERY]=3, [Talents.T_STUNNING_BLOW]=1, + }, + + autolevel = "warriormage", + ai = "dumb_talented_simple", ai_state = { talent_in=4, ai_move="move_astar" }, + + on_die = function(self, who) + game.player:resolveSource():setQuestStatus("start-dunadan", engine.Quest.COMPLETED, "amon-sul") + end, +} diff --git a/game/modules/tome/data/zones/paths-of-the-dead/objects.lua b/game/modules/tome/data/zones/paths-of-the-dead/objects.lua new file mode 100644 index 0000000000000000000000000000000000000000..fa9642c33dee08637bc5da672fc56bd70a5e87e0 --- /dev/null +++ b/game/modules/tome/data/zones/paths-of-the-dead/objects.lua @@ -0,0 +1,47 @@ +-- ToME - Tales of Middle-Earth +-- Copyright (C) 2009, 2010 Nicolas Casalini +-- +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation, either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see <http://www.gnu.org/licenses/>. +-- +-- Nicolas Casalini "DarkGod" +-- darkgod@te4.org + +load("/data/general/objects/objects.lua") + +-- Artifact, droped (and used!) by the Shade of Angmar +newEntity{ base = "BASE_STAFF", + define_as = "STAFF_ANGMAR", rarity=false, + name = "Angmar's Fall", unique=true, + desc = [[Made from the bones of of many creatures this staff glows with power. You can feel its evilness as you touch it.]], + require = { stat = { mag=25 }, }, + cost = 5, + combat = { + dam = 10, + apr = 0, + physcrit = 1.5, + dammod = {mag=1.1}, + }, + wielder = { + see_invisible = 2, + combat_spellpower = 7, + combat_spellcrit = 8, + inc_damage={ + [DamageType.FIRE] = 4, + [DamageType.COLD] = 4, + [DamageType.ACID] = 4, + [DamageType.LIGHTNING] = 4, + [DamageType.BLIGHT] = 4, + }, + }, +} diff --git a/game/modules/tome/data/zones/paths-of-the-dead/traps.lua b/game/modules/tome/data/zones/paths-of-the-dead/traps.lua new file mode 100644 index 0000000000000000000000000000000000000000..3cd3173e45699446c9ad0526d8ce04b7690a2b32 --- /dev/null +++ b/game/modules/tome/data/zones/paths-of-the-dead/traps.lua @@ -0,0 +1,20 @@ +-- ToME - Tales of Middle-Earth +-- Copyright (C) 2009, 2010 Nicolas Casalini +-- +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation, either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see <http://www.gnu.org/licenses/>. +-- +-- Nicolas Casalini "DarkGod" +-- darkgod@te4.org + +load("/data/general/traps/elemental.lua") diff --git a/game/modules/tome/data/zones/paths-of-the-dead/zone.lua b/game/modules/tome/data/zones/paths-of-the-dead/zone.lua new file mode 100644 index 0000000000000000000000000000000000000000..afe5a7ca8414c553ae02a0bd6a5f131418516048 --- /dev/null +++ b/game/modules/tome/data/zones/paths-of-the-dead/zone.lua @@ -0,0 +1,67 @@ +-- ToME - Tales of Middle-Earth +-- Copyright (C) 2009, 2010 Nicolas Casalini +-- +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation, either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see <http://www.gnu.org/licenses/>. +-- +-- Nicolas Casalini "DarkGod" +-- darkgod@te4.org + +return { + name = "Paths of the Dead", + level_range = {1, 8}, + level_scheme = "player", + max_level = 5, + decay = {300, 800}, + actor_adjust_level = function(zone, level, e) return 1 + zone.max_level - (zone.base_level + e:getRankLevelAdjust() + level.level-1 + rng.range(-1,2)) end, + width = 50, height = 50, +-- all_remembered = true, +-- all_lited = true, + persistant = "zone", + ambiant_music = "Dark Secrets.ogg", + generator = { + map = { + class = "engine.generator.map.Roomer", + nb_rooms = 10, + rooms = {"simple", "pilar", {"money_vault",5}}, + lite_room_chance = 100, + ['.'] = "FLOOR", + ['#'] = "WALL", + up = "UP", + down = "DOWN", + door = "DOOR", + }, + actor = { + class = "engine.generator.actor.Random", + nb_npc = {20, 30}, +-- guardian = "SHADE_OF_ANGMAR", -- The gardian is set in the static map + }, + object = { + class = "engine.generator.object.Random", + nb_object = {6, 9}, + filters = { {type="potion" }, {type="potion" }, {type="potion" }, {type="scroll" }, {}, {} } + }, + trap = { + class = "engine.generator.trap.Random", + nb_trap = {6, 9}, + }, + }, + levels = + { + [1] = { + generator = { map = { + up = "UP_WILDERNESS", + }, }, + }, + }, +} diff --git a/game/modules/tome/data/zones/test/zone.lua b/game/modules/tome/data/zones/test/zone.lua index 376fe70083bfa55ec314a370462a05d4d89e9fd3..1849aec7133ac1dc1b6d5d5c40c1473048d21f68 100644 --- a/game/modules/tome/data/zones/test/zone.lua +++ b/game/modules/tome/data/zones/test/zone.lua @@ -31,8 +31,8 @@ return { generator = { map = { class = "engine.generator.map.Forest", - floor = "", - wall = "", + floor = "VOID", + wall = "SPACE_TURBULENCE", up = "UP", down = "DOWN", do_ponds = { diff --git a/game/modules/tome/dialogs/ShowLore.lua b/game/modules/tome/dialogs/ShowLore.lua index f0b4dcb7b99eae91e54e6397d07e913122dd2dff..ad7b0f66e8b941d1f857b337d6f93ab646acf5aa 100644 --- a/game/modules/tome/dialogs/ShowLore.lua +++ b/game/modules/tome/dialogs/ShowLore.lua @@ -68,7 +68,7 @@ function _M:drawDialog(s) local h = 2 if self.list[self.sel] then - local str = ("#GOLD#Catefory:#AQUAMARINE# %s\n#GOLD#Found as:#0080FF# %s\n#GOLD#Text:#ANTIQUE_WHITE# %s"):format(self.list[self.sel].cat, self.list[self.sel].name, self.list[self.sel].desc) + local str = ("#GOLD#Category:#AQUAMARINE# %s\n#GOLD#Found as:#0080FF# %s\n#GOLD#Text:#ANTIQUE_WHITE# %s"):format(self.list[self.sel].cat, self.list[self.sel].name, self.list[self.sel].desc) lines = str:splitLines(self.iw / 2 - 10, self.font) else lines = {} diff --git a/ideas/quests.ods b/ideas/quests.ods index 629365d1c26c7860d211a1c30782846c8a0f47d9..0573d1a7f86d476b1020d1039dc37c1eb89d8781 100644 Binary files a/ideas/quests.ods and b/ideas/quests.ods differ diff --git a/ideas/zones.ods b/ideas/zones.ods index d6510bdae23bee1cbd7343ac6e5f9eeafa5e57cc..89e3b71f237c104d4431c9def34a80a09eea15e9 100644 Binary files a/ideas/zones.ods and b/ideas/zones.ods differ diff --git a/src/core_lua.c b/src/core_lua.c index 7dcaadbae06ca4085422b7d8447786e43910b41f..55f2ace9eb49e727d9194532a71a620ff0182b25 100644 --- a/src/core_lua.c +++ b/src/core_lua.c @@ -2108,7 +2108,7 @@ int luaopen_core(lua_State *L) luaL_openlib(L, "core.game", gamelib, 0); lua_pushstring(L, "VERSION"); - lua_pushnumber(L, 1); + lua_pushnumber(L, 2); lua_settable(L, -3); luaL_openlib(L, "rng", rnglib, 0); diff --git a/src/particles.c b/src/particles.c index 72659605b2257fceeca01c640078ad3e1b5b235b..19a9cc23267b4e85a8d9884b0ba4a47da09d5229 100644 --- a/src/particles.c +++ b/src/particles.c @@ -332,7 +332,7 @@ static int particles_to_screen(lua_State *L) p->x += p->xv; p->y += p->yv; - if (p->dir && p->vel) + if (p->vel) { p->x += cos(p->dir) * p->vel; p->y += sin(p->dir) * p->vel;