diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2011-06-01 11:16:33 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2011-06-01 11:16:33 (GMT) |
| commit | 3d600c69558b4b3e3f05b860531942f1ea2cd1c1 (patch) | |
| tree | a9613463a3f70f856097786ea2c47a438b459e07 /src/main.c | |
| parent | 2c8c4bc567b09996ee69584a7229356cd411c51a (diff) | |
| download | powder-3d600c69558b4b3e3f05b860531942f1ea2cd1c1.zip powder-3d600c69558b4b3e3f05b860531942f1ea2cd1c1.tar.gz | |
Add gravity field manipulation to Lua api, move gravity processing to after the particle update (Means a delay of 1 frame, but we get the ability to manipulate the field with Lua)
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -1775,7 +1775,13 @@ int main(int argc, char *argv[]) bsy = 1180; if (bsy<0) bsy = 0; - + + if(ngrav_enable) + draw_grav(vid_buf); + draw_walls(vid_buf); + update_particles(vid_buf); //update everything + draw_parts(vid_buf); //draw particles + if(ngrav_enable){ pthread_mutex_lock(&gravmutex); result = grav_ready; @@ -1794,12 +1800,6 @@ int main(int argc, char *argv[]) if (!sys_pause||framerender) //Only update if not paused memset(gravmap, 0, sizeof(gravmap)); //Clear the old gravmap - - if(ngrav_enable) - draw_grav(vid_buf); - draw_walls(vid_buf); - update_particles(vid_buf); //update everything - draw_parts(vid_buf); //draw particles if (cmode==CM_PERS) { |
