diff options
author | Aaron Carlisle <carlisle.b3d@gmail.com> | 2017-07-26 22:56:43 +0300 |
---|---|---|
committer | Aaron Carlisle <carlisle.b3d@gmail.com> | 2017-07-26 23:05:54 +0300 |
commit | 320fc70cf223ba3d8c3822302d5f353861278089 (patch) | |
tree | ce24a7568084a77dac551f8ef31ca5b87999968e /release | |
parent | 66e28a2827ab589756882983e07808742c198cb2 (diff) |
Minor template code patch. (objectHitList =/= hitObjectList)
The Blender text editor's built in python template "Gamelogic" has a reference near the bottom to "objectHitList" as an alleged attribute to the KX_TouchSensor. This name is incorrect, it's correct name is "hitObjectList."
Attempting to access the suggested objectHitList returns error...
```
AttributeError: 'KX_TouchSensor' object has no attribute 'objectHitList'
```
The provided diff corrects this minor error.
Reviewers: kupoman, moguri, campbellbarton, Blendify
Reviewed By: Blendify
Tags: #game_engine, #game_python
Differential Revision: https://developer.blender.org/D2748
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/templates_py/gamelogic.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/release/scripts/templates_py/gamelogic.py b/release/scripts/templates_py/gamelogic.py index 01ac27c56cd..e589ad43e63 100644 --- a/release/scripts/templates_py/gamelogic.py +++ b/release/scripts/templates_py/gamelogic.py @@ -62,7 +62,7 @@ def main(): # adding to our objects "life" property """ actu_collide = cont.sensors["collision_sens"] - for ob in actu_collide.objectHitList: + for ob in actu_collide.hitObjectList: # Check to see the object has this property if "life" in ob: own["life"] += ob["life"] |