mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-05-30 08:32:00 +00:00
Visual mode: fixed incorrect sidedef texture mouse dragging when texture was scaled in TEXTURES.
Visual mode: texture offsets are now clamped to texture size when dragging textures with mouse. Visual mode, UDMF: when gravity is enabled, sector gravity now affects camera movement.
This commit is contained in:
parent
b39dcdcb9a
commit
82722e546c
11 changed files with 46 additions and 34 deletions
|
@ -1008,7 +1008,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
else
|
||||
{
|
||||
// Fall down
|
||||
gravity.z += GRAVITY * deltatime;
|
||||
gravity.z += GRAVITY * General.Map.VisualCamera.Gravity * deltatime;
|
||||
if(gravity.z > 3.0f) gravity.z = 3.0f;
|
||||
|
||||
// Test if we don't go through a floor
|
||||
|
@ -1324,13 +1324,15 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
{
|
||||
Dictionary<Sidedef, int> donesides = new Dictionary<Sidedef, int>(selectedobjects.Count);
|
||||
List<IVisualEventReceiver> objs = GetSelectedObjects(false, true, false, false);
|
||||
foreach(IVisualEventReceiver i in objs)
|
||||
{
|
||||
if(i is BaseVisualGeometrySidedef)
|
||||
{
|
||||
if(!donesides.ContainsKey((i as BaseVisualGeometrySidedef).Sidedef))
|
||||
foreach(IVisualEventReceiver i in objs) {
|
||||
BaseVisualGeometrySidedef vs = i as BaseVisualGeometrySidedef; //mxd
|
||||
|
||||
if(i is BaseVisualGeometrySidedef) {
|
||||
if(!donesides.ContainsKey(vs.Sidedef))
|
||||
{
|
||||
i.OnChangeTextureOffset(dx, dy, false);
|
||||
//mxd. added scaling by texture scale
|
||||
if(vs.Texture.UsedInMap) //mxd. Otherwise it's MissingTexture3D and we probably don't want to drag that
|
||||
vs.OnChangeTextureOffset((int)(dx / vs.Texture.Scale.x), (int)(dy / vs.Texture.Scale.y), false);
|
||||
donesides.Add((i as BaseVisualGeometrySidedef).Sidedef, 0);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue