diff options
| author | savask <savask@yandex.ru> | 2011-04-30 13:41:15 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2011-05-05 19:24:42 (GMT) |
| commit | f0c5960b563e4cbb3efe928df363e82a62d78e3a (patch) | |
| tree | e3622245a922545343610a902ab11ae5530dbac1 /src/console.c | |
| parent | 3ea306cc771bbaefa01058c810fc1dd041a17641 (diff) | |
| download | powder-f0c5960b563e4cbb3efe928df363e82a62d78e3a.zip powder-f0c5960b563e4cbb3efe928df363e82a62d78e3a.tar.gz | |
Some work on bubbles. Added "bubble x,y" command to console.
Also made them save like regular soap.
Diffstat (limited to 'src/console.c')
| -rw-r--r-- | src/console.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/console.c b/src/console.c index 634e679..e926328 100644 --- a/src/console.c +++ b/src/console.c @@ -1108,6 +1108,32 @@ int process_command_old(pixel *vid_buf, char *console, char *console_error) strcpy(console_error, "Could not create particle"); } } + else if (strcmp(console2, "bubble")==0 && console3[0]) + { + if (console_parse_coords(console3, &nx, &ny, console_error)) + { + int first, rem1, rem2; + + first = create_part(-1, nx+18, ny, PT_SOAP); + rem1 = first; + + for (i = 1; i<=30; i++) + { + rem2 = create_part(-1, nx+18*cosf(i/5.0), ny+18*sinf(i/5.0), PT_SOAP); + + parts[rem1].ctype = 7; + parts[rem1].tmp = rem2; + parts[rem2].tmp2 = rem1; + + rem1 = rem2; + } + + parts[rem1].ctype = 7; + parts[rem1].tmp = first; + parts[first].tmp2 = rem1; + parts[first].ctype = 7; + } + } else if ((strcmp(console2, "delete")==0 || strcmp(console2, "kill")==0) && console3[0]) { if (console_parse_partref(console3, &i, console_error)) |
