diff --git a/src/main.c b/src/main.c index 960f09303..c34e3300a 100644 --- a/src/main.c +++ b/src/main.c @@ -1454,10 +1454,11 @@ static PyObject* emb_set_type(PyObject *self, PyObject *args, PyObject *keywds) static PyObject* emb_set_temp(PyObject *self, PyObject *args, PyObject *keywds) { - int i = -1,life,j,x=-1,y=-1; + int i = -1,j,x=-1,y=-1; + float newval; char *name = ""; char *kwlist[] = {"setto", "setfrom", "i", "x", "y", NULL}; - if(!PyArg_ParseTupleAndKeywords(args, keywds, "I|sIII:set_type",kwlist ,&life,&name,&i,&x,&y)) + if(!PyArg_ParseTupleAndKeywords(args, keywds, "f|sIII:set_type", kwlist, &newval, &name, &i, &x, &y)) return NULL; // if(strcmp(name,"")==0 && x==-1 && y==-1 && i==-1) @@ -1467,7 +1468,7 @@ static PyObject* emb_set_temp(PyObject *self, PyObject *args, PyObject *keywds) for(i=0; i=0 && x=0 && y>8].type != PT_NONE) - parts[pmap[y][x]>>8].temp = life; + parts[pmap[y][x]>>8].temp = newval; } return Py_BuildValue("i",1); } @@ -4138,28 +4139,28 @@ int process_command_old(pixel *vid_buf,char *console,char *console_error) { { if(strcmp(console4, "all")==0) { - j = atoi(console5); + f = atof(console5); for(i=0; i