Pottus / Texture-Studio

86 stars 90 forks source link

Group object editing improvement #30

Closed Pottus closed 6 years ago

Pottus commented 8 years ago

Use the LAST update position to save group edits there is a bug in SA-MP that causes the update to not update the last position once a object has stopped moving.

Crayder commented 8 years ago

LastGroupPosition?

Pottus commented 8 years ago

Yes so it doesn't snap ahead.

Crayder commented 8 years ago

Yeah, it's quite annoying. Adding when I get the chance.

Crayder commented 8 years ago

So in EDIT_RESPONSE_FINAL I need to change this

offx = (ObjectData[i][oX] + (x - gCenterX)) - PivotOffset[playerid][xPos];
offy = (ObjectData[i][oY] + (y - gCenterY)) - PivotOffset[playerid][yPos];
offz = (ObjectData[i][oZ] + (z - gCenterZ)) - PivotOffset[playerid][zPos];

to this?

offx = (ObjectData[i][oX] + (LastGroupPosition[playerid][xPos] - gCenterX)) - PivotOffset[playerid][xPos];
offy = (ObjectData[i][oY] + (LastGroupPosition[playerid][yPos] - gCenterY)) - PivotOffset[playerid][yPos];
offz = (ObjectData[i][oZ] + (LastGroupPosition[playerid][zPos] - gCenterZ)) - PivotOffset[playerid][zPos];

EDIT: I was looking for confirmation @Pottus... xD