Physics Props Fix

Credits

Submitter
  • P5: Peddler
    Points: 156,185
  • E6: Authority
    EF: 219
  • C4: Super Moderator
  • A6: Elder
    Account Age: 6 years
Logan Dougall
(Creator/Co-creator)
Key Authors
Logan Dougall
Writer, Mapper, Lover,
Special Thanks
Graceful
Providing Caffeine

Rating

9.8/10
Based off 5 rating(s)

Additional Info

Genre
Mapping
Difficulty Level
Beginner

Stats

Post Count
8
ViewCount
2,310
Date Added
3 years ago
Date Modified
6 months ago

Share

Embed Code
Code to use:

More embeddable images

A short tutorial to fix physics props placement and spawn lag.

Physics Props Fix Anyone who has made a map has at some point used the prop_physics entities, so you're familiar with the effect you see upon map spawn where everything lags for a few seconds as all the physics entities drop and 'settle' in the map. Crates, barrels and other odd items fall to the ground all at once and so on.

There is a simple way to fix that and it takes only a few minutes to do.

For those not familiar with the problem I just mentioned then here's a quick animation showing a common issue:

I've uploaded a .vmf for you to play with, its a small enough testing map so that you won't be straining your computer. BOTH hammer and Day of Defeat Source (or any source game for that matter) must be open at the same time, hence the small example map.

sdkmapedit

There are hud hints to help you remember commands etc In-Game so you don't have to toggle in/out of it while reading this tutorial - However, I still suggest reading this tutorial heh, so you know why your doing the things the map tells you to.

Prep Work


Before I show you how to fix this problem there is a setting we have to turn off in hammer so that this will work properly.

Hammers Autosave: Normally this is a mappers saving grace for preventing lost work due to a crash; however, to fix the physics props issue we need to turn this off.

The copy of the map within hammer must match EXACTLY that of the compiled map, even just hitting the save button makes them different versions and breaks the process as their will be no communication between your game and hammer.

To turn off the autosave feature go to the top menu bar, select Tools > Options,

Then within that dialogue box switch to the General Tab and halfway down you will see the autosave settings,

Just un-check the box if it isn't already and your good to go.

Now you will be fine to compile the map again - for the sake of just fixing props don't bother running either VVIS or VRAD.

The How-To:


  1. Open Hammer
  2. Load your map (or the provided Test map)
  3. Press F9 or the compile button
    • Compile only BSP, leave VVIS and VRAD as "No"
  4. Leave Hammer OPEN and DO NOT SAVE
  5. Open applicable Source game
  6. Open the Command Console, type "mapedit MAPNAME"
    • Do not load the map via a Create Server button, you must use the mapedit command
  7. When the map has loaded use the "hosttimescale 10" console command to speed up the process a bit so things are perfectly settled and doesn't take a few minutes but rather seconds.
    • Once things are settled you can put the "hosttimescale" value back to 1.
  8. Type "hammerupdateentity propphysics" and/or "hammerupdateentity propphysicsmultiplayer"
  9. Exit the Game and Switch to Hammer, you may now save the map with its new changes.
*Note that for any Orange box games you should be using "hammerupdateentity", for EP1 games you would be using "wcupdate_entity"; however, this feature in EP1 Games seems to have been removed/broken upon the OB release as there is no communication between the editor and the game anymore, currently the orangebox command is the only one that will work. I only tested it on a few EP1 Games, if you find one that works please tell me.

A green Border outline of the props in-game means that the changes were successfully transferred to Hammer, red border means they were not. Double check your steps if you got all red borders on your entities.

* Exaggeration for effect.

Now that the props positions have changed in hammer remember to save - also turn on your autosaves again - and lastly go through your prop_physics entities and check on their "Start Asleep" flags. The start of round/map spawn lag will be gone and the props will only perform their physics calculations when something touches them.

Oh noes! You're not a Member!

Want access to cool stuff? As a member you can:

  • Post. Give the submitter your thoughts on this Tutorial.
  • Say Thanks. Show your appreciation by sending the submitter points.
  • Stamp Posts. Let other posters know what you think of their posts.
  • Rate. Give this Tutorial a rating out of 10.
  • Flag. Alert moderators and warn members of a problem with this Tutorial.
  • Vote. Vote the submitter for the Monthly Awards.
  • Subscribe. Get notified when this submitter submits again.

Interested? Register or Login

Comments

    • P2: Drudge
      Points: 1,141
    • E2: Guide
      EF: 21
    • C1: Member
    • A5: Veteran
      Account Age: 4 years

    Lost, this is absolutely brilliant. This method isn't something you'd find on a Valve Developer Community tutorial-- it's original and it's intuitive. I really do appreciate the help, this is simply genius. Thank you very much.

    Mapper, Graphic Artist
    • P1: Beggar
      Points: 291
    • C1: Member
    • A4: Graduate
      Account Age: 3 years

    Great tutorial! Very helpful. Oddly, this was exactly what I was looking for and it's the first thing I see when I come on FPSBanana.

    Snoogums
    • P3: Peasant
      Points: 8,430
    • E1: Helper
      EF: 14
    • C1: Member
    • A5: Veteran
      Account Age: 5 years

    A very good tutorial for the propphysics, I've nearly always had some problems with the propphysics. and this describes it very good, it's a clear tutorial

    Proud GTX285 User (02 June 200
    • P2: Drudge
      Points: 3,803
    • E1: Helper
      EF: 2
    • C1: Member
    • A5: Veteran
      Account Age: 4 years

    Ah ok i gotcha now

    run, gun, reload
    • P5: Peddler
      Points: 156,185
    • E6: Authority
      EF: 219
    • C4: Super Moderator
    • A6: Elder
      Account Age: 6 years
    Logan Dougall

    Posted by Mastergun

    Great tutorial like usual. one question though, when you hit compile doesnt hammer save the map anyway or is that why you turned off the auto save option ?

    The map is saved before/as it compiles, hence why the versions match at that point. However due to the time between your compiling it and loading the game and then the map itself, hammer may have ran an autosave within that period which makes it a newer version. That's why autosave must be off.

    You need time to get things done.

    .awesome { Uberstylers:Club; }
    • P2: Drudge
      Points: 3,803
    • E1: Helper
      EF: 2
    • C1: Member
    • A5: Veteran
      Account Age: 4 years

    Great tutorial like usual. one question though, when you hit compile doesnt hammer save the map anyway or is that why you turned off the auto save option ?

    run, gun, reload
  • Anonymous

    Once again Lost, you have gone above and beyond the expected. This is such a cool trick and, to be honest, I never even would have thought that there was a fix to this problem in the first place.

    The only problem I have with your tut is the introduction. At first I was confused about the tutorial's purpose, so I think you may want to spend a few minutes on the opening paragraph and make it more concise.

    Can't wait for you to finish up your other "WiP" tutorials!

    • P1: Beggar
      Points: 436
    • C1: Member
    • A5: Veteran
      Account Age: 4 years

    What a superb tutorial! This is something i've always had problems with. And now, with your epic explanation of fixing the problem, i never have to worry about it again. Thank you!

    Title goes here.