aboutsummaryrefslogtreecommitdiff
path: root/plugins/fireball
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/fireball')
-rw-r--r--plugins/fireball/fireball.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/fireball/fireball.c b/plugins/fireball/fireball.c
index 1c3eeb6..3da29a4 100644
--- a/plugins/fireball/fireball.c
+++ b/plugins/fireball/fireball.c
@@ -15,6 +15,10 @@ static void fireball_spawn(struct entity *self, void *data)
{
self->meta = malloc(sizeof(struct fireball_data));
*((struct fireball_data *) self->meta) = *((struct fireball_data *) data);
+
+ self->color.r = clamp(self->color.r + rand() % 65 - 32, 0, 255);
+ self->color.g = clamp(self->color.g + rand() % 65 - 32, 0, 255);
+ self->color.b = clamp(self->color.b + rand() % 65 - 32, 0, 255);
}
static void fireball_step(struct entity *self, struct entity_step_data stepdata)