Made changing CFrame not require whole part re-rendering
This commit is contained in:
@@ -221,7 +221,6 @@ void PartInstance::setPosition(Vector3 pos)
|
|||||||
{
|
{
|
||||||
position = pos;
|
position = pos;
|
||||||
cFrame = CoordinateFrame(cFrame.rotation, pos);
|
cFrame = CoordinateFrame(cFrame.rotation, pos);
|
||||||
changed = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CoordinateFrame PartInstance::getCFrame()
|
CoordinateFrame PartInstance::getCFrame()
|
||||||
@@ -232,7 +231,7 @@ void PartInstance::setCFrame(CoordinateFrame coordinateFrame)
|
|||||||
{
|
{
|
||||||
cFrame = coordinateFrame;
|
cFrame = coordinateFrame;
|
||||||
position = coordinateFrame.translation;
|
position = coordinateFrame.translation;
|
||||||
changed = true;
|
//changed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PartInstance::collides(PartInstance * part)
|
bool PartInstance::collides(PartInstance * part)
|
||||||
@@ -325,10 +324,10 @@ static TCHAR* enumStr(int shape)
|
|||||||
|
|
||||||
void PartInstance::PropUpdate(LPPROPGRIDITEM &item)
|
void PartInstance::PropUpdate(LPPROPGRIDITEM &item)
|
||||||
{
|
{
|
||||||
setChanged();
|
|
||||||
if(strcmp(item->lpszPropName, "Color3") == 0)
|
if(strcmp(item->lpszPropName, "Color3") == 0)
|
||||||
{
|
{
|
||||||
color = Color3(GetRValue(item->lpCurValue)/255.0F,GetGValue(item->lpCurValue)/255.0F,GetBValue(item->lpCurValue)/255.0F);
|
color = Color3(GetRValue(item->lpCurValue)/255.0F,GetGValue(item->lpCurValue)/255.0F,GetBValue(item->lpCurValue)/255.0F);
|
||||||
|
setChanged();
|
||||||
}
|
}
|
||||||
else if(strcmp(item->lpszPropName, "Anchored") == 0)
|
else if(strcmp(item->lpszPropName, "Anchored") == 0)
|
||||||
{
|
{
|
||||||
@@ -396,6 +395,11 @@ void PartInstance::PropUpdate(LPPROPGRIDITEM &item)
|
|||||||
printf("%s", enumStr(strEnum((TCHAR*)item->lpCurValue)));
|
printf("%s", enumStr(strEnum((TCHAR*)item->lpCurValue)));
|
||||||
setShape(strEnum((TCHAR*)item->lpCurValue));
|
setShape(strEnum((TCHAR*)item->lpCurValue));
|
||||||
}
|
}
|
||||||
|
else if(strcmp(item->lpszPropName, "Controller") == 0)
|
||||||
|
{
|
||||||
|
setChanged();
|
||||||
|
PVInstance::PropUpdate(item);
|
||||||
|
}
|
||||||
else PVInstance::PropUpdate(item);
|
else PVInstance::PropUpdate(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user