summaryrefslogtreecommitdiff
path: root/src/elements/clne.c
diff options
context:
space:
mode:
authorjacksonmj <mj-pt@jacksonmj.co.uk>2011-06-24 21:55:59 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2011-06-25 14:59:30 (GMT)
commit34d76f86803138699b46f7e6252c11985ef481cf (patch)
tree99c962bea2e407f70a20b1d69f1c453f2abfc04c /src/elements/clne.c
parentc18009dd9c87343178e808565d815b454bd2b585 (diff)
downloadpowder-34d76f86803138699b46f7e6252c11985ef481cf.zip
powder-34d76f86803138699b46f7e6252c11985ef481cf.tar.gz
Check photon map in Lua functions, and allow any ctype
Also add some extra checks on ctype in the rest of the game
Diffstat (limited to 'src/elements/clne.c')
-rw-r--r--src/elements/clne.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/elements/clne.c b/src/elements/clne.c
index 295974a..adc9a18 100644
--- a/src/elements/clne.c
+++ b/src/elements/clne.c
@@ -1,7 +1,7 @@
#include <element.h>
int update_CLNE(UPDATE_FUNC_ARGS) {
- if (!parts[i].ctype)
+ if (parts[i].ctype<=0 || parts[i].ctype>=PT_NUM)
{
int r, rx, ry;
for (rx=-1; rx<2; rx++)