aboutsummaryrefslogtreecommitdiff
path: root/build/android/src/main/res/drawable-hdpi
diff options
context:
space:
mode:
authorRogier <rogier777@gmail.com>2016-11-06 16:18:29 +0100
committerNer'zhul <nerzhul@users.noreply.github.com>2016-11-13 10:10:28 +0100
commit1980d9ea31e969c5b604f6ee01693cbcfc2c795a (patch)
treebabe0e607937d8decffcd8451d04b912e8145b5c /build/android/src/main/res/drawable-hdpi
parente4031156f13d062b03960e7ef1c9221f749f884b (diff)
Fix crash when attached object no longer exists
Active objects that are attached to other objects are not safe from deletion. As a result, the parent object may have a reference to an id of a child's that no longer exists. If at some point an attempt is made to manipulate the child, enviromment->getActiveObject(child-id) returns NULL. Using the NULL pointer causes the crash...
Diffstat (limited to 'build/android/src/main/res/drawable-hdpi')
0 files changed, 0 insertions, 0 deletions
d='n135' href='#n135'>135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227
--couple.lua
--defines couple entities.

--advtrains:discouple
--set into existing trains to split them when punched.
--they are attached to the wagons.
--[[fields
wagon

wagons keep their couple entity minetest-internal id inside the field discouple_id. if it refers to nowhere, they will spawn a new one if player is near
]]

local couple_max_dist=3

minetest.register_entity("advtrains:discouple", {
	visual="sprite",