summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCracker64 <cracker642@gmail.com>2011-03-30 03:58:49 (GMT)
committer Simon <simon@hardwired.org.uk>2011-03-30 17:58:07 (GMT)
commit8fc59be94418e737445f7895f776e32dfefd514b (patch)
tree2e1b3bd2308d9808210d0802b76ab43d6882895b
parentb7a004986f70986aa9cd314d754deddff6b031f0 (diff)
downloadpowder-8fc59be94418e737445f7895f776e32dfefd514b.zip
powder-8fc59be94418e737445f7895f776e32dfefd514b.tar.gz
set_vx and vy fixes, float to int is not good.
-rw-r--r--src/main.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index d6524ca..67e7aa8 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1654,7 +1654,8 @@ static PyObject* emb_set_ctype(PyObject *self, PyObject *args, PyObject *keywds)
static PyObject* emb_set_vx(PyObject *self, PyObject *args, PyObject *keywds)
{
- int i = -1,life,j,x=-1,y=-1;
+ int i = -1,j,x=-1,y=-1;
+ float life;
char *name = "";
char *kwlist[] = {"setto", "setfrom", "i", "x", "y", NULL};
if(!PyArg_ParseTupleAndKeywords(args, keywds, "f|sIII:set_type",kwlist ,&life,&name,&i,&x,&y))
@@ -1694,7 +1695,8 @@ static PyObject* emb_set_vx(PyObject *self, PyObject *args, PyObject *keywds)
static PyObject* emb_set_vy(PyObject *self, PyObject *args, PyObject *keywds)
{
- int i = -1,life,j,x=-1,y=-1;
+ int i = -1,j,x=-1,y=-1;
+ float life;
char *name = "";
char *kwlist[] = {"setto", "setfrom", "i", "x", "y", NULL};
if(!PyArg_ParseTupleAndKeywords(args, keywds, "f|sIII:set_type",kwlist ,&life,&name,&i,&x,&y))
@@ -3816,6 +3818,11 @@ int process_command(pixel *vid_buf,char *console,char *console_error,PyObject *p
if(strcmp(console2, "quit")==0)
{
return -1;
+ }
+ if(strcmp(console2, "eqvetest")==0)
+ {
+ EQVETEST = !EQVETEST;
+ return 1;
} else {
//handle them command
pargs=Py_BuildValue("(s)",console);